REST Client
Documentation can be found here
REST client consists of the next clients:
public
- public methods client;
orders
- orders methods client;
trade
- trade methods client;
user
- user methods client.
Public Client
Order Rules
This endpoint provides all the values for the rules that an order needs to fulfill in order for it to be placed successfully
Parameter name | Type | Is required? | Description |
---|---|---|---|
symbol | string | Yes | Symbol for which to get order rules |
Available Pairs
Get available symbols that Orderly supports, and also send order rules for each symbol
Parameters: None
Fee Structure
Get the latest Orderly fee structure
Parameters: None
Market Trades
Get the latest market trades
Parameter name | Type | Is required? | Description |
---|---|---|---|
symbol | string | Yes | For which symbol to get latest market trades |
limit | number | No | How may records to return |
Orders client
Create Order
Parameter name | Type | Is required? | Description |
---|---|---|---|
symbol | string | Yes | Token symbol |
client_order_id | string | No | Customized order_id, a unique id among open orders |
order_type | enum | Yes | Order type. Possible values are: LIMIT/MARKET/IOC/FOK/POST_ONLY/ASK/BID. |
order_price | number | No | If order_type is MARKET, then is not required, otherwise this parameter is required |
order_quantity | number | No | For MARKET/ASK/BID order, if order_amount is given, it is not required. |
order_amount | number | No | For MARKET/ASK/BID order, the order size in terms of quote currency |
visible_quantity | number | No | The order quantity shown on orderbook. (default: equal to order_quantity) |
side | enum | Yes | Order side. Possible values are: SELL/BUY. |
Batch Create Order
Places multiple orders at once
Parameter name | Type | Is required? | Description |
---|---|---|---|
orders | array | Yes | Array of objects used for create order request |
Cancel
Cancels placed request
Parameter name | Type | Is required? | Description |
---|---|---|---|
symbol | string | Yes | Token symbol |
order_id | number | Required if client_order_id is not provided | ID of the order |
client_order_id | number | Required if order_id is not provided | client_order_id of the order |
Cancel Order in Bulk
Cancels multiple placed orders for a symbol
Parameter name | Type | Is required? | Description |
---|---|---|---|
symbol | string | Yes | Token symbol |
Get an order
Gets an order by client_order_id
or order_id
Parameter name | Type | Is required? | Description |
---|---|---|---|
order_id | number | Required if client_order_id is not provided | ID of the order |
client_order_id | number | Required if order_id is not provided | client_order_id of the order |
Get Orders
Gets multiple orders by provided params
Parameter name | Type | Is required? | Description |
---|---|---|---|
symbol | string | No | Which token to query orders for |
side | enum | No | Which order side orders to get. Possible values are: BUY/SELL. |
order_type | enum | No | Which order type orders to get. Possible values are LIMIT/MARKET |
order_tag | string | No | An optional tag for the order. |
status | enum | No | Which order status orders to get. Possible values are: NEW/CANCELLED/PARTIAL_FILLED/FILLED/REJECTED/INCOMPLETE/COMPLETED |
start_t | number | No | Start time range that wish to query, noted the time stamp is 13-digits timestamp. |
end_t | number | No | End time range that wish to query, noted the time stamp is 13-digits timestamp. |
page | number | No | The page wish to query (default: 1). |
size | number | No | The page size wish to query (default: 25, max: 500) |
Orderbook snapshot
Get a snapshot of the current orderbook
Parameter name | Type | Is required? | Description |
---|---|---|---|
symbol | string | Yes | Token symbol for which to get the snapshot |
max_level | number | No | The levels wish to show on both side (default: 100). |
Trade client
Get Kline
Get the latest klines of the trading pairs
Parameter name | Type | Is required? | Description |
---|---|---|---|
symbol | string | Yes | Token symbol for which to get klines |
type | enum | Yes | Which kline type to get 1m/5m/15m/30m/1h/4h/12h/1d/1w/1mon/1y |
limit | number | No | Number of klines to get (default: 100, maximum: 1000). |
Order Trades
Get specific order trades by order_id
Parameter name | Type | Is required? | Description |
---|---|---|---|
order_id | number | Yes | ID of the order |
Get Trades
Get the client’s trades history in a range of time
Parameter name | Type | Is required? | Description |
---|---|---|---|
symbol | string | No | Token symbol for which to get trades |
tag | string | No | An optional tag for the order. |
start_t | number | No | Start time range that wish to query, noted the time stamp is 13-digits timestamp. |
end_t | number | No | End time range that wish to query, noted the time stamp is 13-digits timestamp. |
page | number | No | The page wish to query (default: 1). |
size | number | No | The page size wish to query (default: 25) |
Transaction Detail
Get specific transaction detail by trade id
Parameter name | Type | Is required? | Description |
---|---|---|---|
tradeId | number | Yes | ID of the trade |
User client
Check holdings
Get a holding summary of the user
Parameter name | Type | Is required? | Description |
---|---|---|---|
all | boolean | No | If true then will return all token even if balance is empty. |
Account Information
Get account information
Parameters: None
Asset History
Get asset history, including token deposit/withdraw and collateral deposit/withdraw.
Parameter name | Type | Is required? | Description |
---|---|---|---|
token | string | No | Token name you want to search |
side | enum | No | Which history record type to query. Possible values are: DEPOSIT/WITHDRAW |
status | enum | No | Which status to search. Possible values are: NEW/CONFIRM/PROCESSING/COMPLETED/FAILED |
start_t | number | No | Start time range that wish to query, noted the time stamp is 13-digits timestamp. |
end_t | number | No | End time range that wish to query, noted the time stamp is 13-digits timestamp. |
page | number | No | The page wish to query (default: 1). |