Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 4.77 KB

create_an_order.md

File metadata and controls

58 lines (42 loc) · 4.77 KB

Create An Order

Create an order api, this endpoint support to limit, market and stop-limit order.

After initiating an order, you can utilize the WebSocket streams for both open orders and history orders to continuously receive updated information about your orders in real-time.

Api Request

Rate Limit: Allow 1200 requests per minute per IP & UID.

POST /orders/{pair}

Parameters:

You can find how to create payload and signature from authentication document.

Header Path Query Type Required Description Default Range Example
X-BITOPRO-APIKEY string Yes API Key
X-BITOPRO-PAYLOAD string Yes Payload
X-BITOPRO-SIGNATURE string Yes Signature
pair string Yes The trading pair in format {BASE}_{QUOTE}, Please follow the link to check the pair list. bito_eth

Request body:

Field Type Required Description Default Range Example
action string Yes The action type of the order. BUY, SELL SELL
amount string Yes The base amount of the order for the trading pair. However, when executing a market buy order, this field represents the order's quote value. Please check this doc for limitation. 123.25
price string Yes The price of the order for the trading pair. 0.000075
timestamp integer Yes The client timestamp in millisecond. 1504262258000
type string Yes The order type. LIMIT, MARKET, STOP_LIMIT MARKET
stopPrice string No The price to trigger stop limit order, only required when type is STOP_LIMIT. 3564.2563
condition string No The condition to match stop price, only required when type is STOP_LIMIT. >=, <= <=
timeInForce string No Time in force condition for orders. If type are MARKET, STOP_LIMIT, this will always be GTC. GTC GTC, POST_ONLY POST_ONLY
clientId uint64 No This information help users distinguish their orders. 1 ~ 2147483647 12345
percentage uint64 No The amount of the sell order which can be percentage of your balance. (e.g 1 mean 1%) 1~100 100

Api Response

Response Body:

{
  "orderId": 1234567890,
  "action": "BUY",
  "amount": "250",
  "price": "0.000075",
  "timestamp": 1504262258000,
  "timeInForce": "POST_ONLY",
  "clientId": 12345
}

Back