Skip to content

IntegralTeam/scripted-trader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scripted Trader

Prerequisites

  • Node.JS v11.x
  • TypeScript v3.3+
  • Yarn latest
  • Redis latest

Running

  1. Run yarn to install dependencies
  2. Compile TypeScript to JavaScrip
  3. Run the application from dist directory

API Reference

  • POST /trade - Begins trading for provided exchange with provided steps (currently only OKEx is supported). Returns an id of a trade request that can be used to fetch the status of the request.
in: {
    	"exchange": "okex",
    	"steps": [{
    		"pair": "ETH/BTC",
    		"price": 0.00001,
    		"quantity": 10,
    		"side": "buy"
    	}]
    }
    
out: {
         "result": {
             "id": "7ac2393d-647b-41bb-bc17-00a423341018"
         }
     }
  • GET /trade/:id - Returns all information about the trading request
{
    "result": {
        "id": "7ac2393d-647b-41bb-bc17-00a423341018",
        "totalDelay": 2954,
        "steps": [
            {
                "pair": "ETH/BTC",
                "price": 0.00001,
                "quantity": 10,
                "side": "buy",
                "id": "7ac2393d-647b-41bb-bc17-00a423341018",
                "index": 0,
                "exchange": "okex",
                "status": 4,
                "startingTime": 1559839673456,
                "orderID": "2955914527577088",
                "transmissionDelay": 2954
            }
        ]
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published