Sends a single, new order into the exchange.
Authentication
Using the sign in to the API Login Use
Params
Param | Description |
---|---|
token | Token get in login process |
api_key_auth | Api key delivered by Depasify |
example
URL_WEBSOCKET = wss://{host}?token=sing_token
const ws = new WebSocket(URL_WEBSOCKET, [api_key_auth]) ;
Message structure
Param | Mandatory | Example | Type | Description |
---|---|---|---|---|
subscribe | Y | trade | string | type of message send. In that moment use always 'trade' |
account_id | Y | uuid | string | Id of the account to be associated with the trade |
pair | Y | BTC/EUR | string | The symbol of the currency pair. |
type | Y | buy | string | Side of the order. Valid values: [buy, sell] |
volume | N | 0.001 | decimal | Mandatory if type: 'sell' volume in terms of the base asset |
amount | N | 30000 | decimal | Mandatory if type: 'buy' amount in terms of the quote asset |
orderType | Y | market | string | Order type. Valid values: [market, limit]. |
price. | N | 50000 | decimal | Mandatory if orderType: 'limit'. Order limit price |
time_force | Y | FillAndKill | string | Specifies how long the order remains in effect. Valid values: [GoodTillCancel, FillAndKill, or FillOrKill.] |