Trade
Place a new order.
Rate Limit: 100 requests per 2 seconds
Weight: 5 (IP/UID)
Your API-key
Timestamp in milliseconds
Signature of the request
BTC/USDT1.595000.5myCustomOrderId12350009600Order successfully placed.
POST /sapi/v2/order HTTP/1.1
Host: openapi.coinlocally.com
X-CH-APIKEY: text
X-CH-TS: 1
X-CH-SIGN: text
Content-Type: application/json
Accept: */*
Content-Length: 156
{
"symbol": "BTC/USDT",
"volume": 1.5,
"side": "BUY",
"type": "LIMIT",
"price": 95000.5,
"newClientOrderId": "myCustomOrderId123",
"recvwindow": 5000,
"triggerPrice": 9600
}Order successfully placed.
{
"symbol": "LXTUSDT",
"orderId": 150695552109032480,
"orderIdString": "150695552109032492",
"clientOrderId": "157371322565051",
"transactTime": "1573713225668",
"price": "0.005452",
"origQty": "110",
"executedQty": "0",
"status": "0",
"type": "LIMIT",
"side": "SELL"
}Test new order creation and signature/recvWindow length. Creates and validates a new order but does not send the order into the matching engine.
Your API key
Timestamp of the request
Request signature
Type of the order
LIMITOrder price, REQUIRED for LIMIT orders
1000.01Order volume. For MARKET BUY orders, vol=amount
1.5Side of the order, BUY or SELL
BUYSymbol name, e.g., BTC/USDT
BTC/USDTTime window for the request to be valid
5000Unique order ID generated by users
my_custom_id_001Successfully tested order
No content
POST /sapi/v2/order/test HTTP/1.1
Host: openapi.coinlocally.com
X-CH-APIKEY: text
X-CH-TS: text
X-CH-SIGN: text
Content-Type: application/json
Accept: */*
Content-Length: 134
{
"type": "LIMIT",
"price": 1000.01,
"volume": 1.5,
"side": "BUY",
"symbol": "BTC/USDT",
"recvwindow": 5000,
"newClientorderId": "my_custom_id_001"
}Successfully tested order
No content
Place a batch of up to 10 orders in a single request.
Weight: 10 (IP/UID)
Your API key
Timestamp of the request
Request signature
Trading pair symbol
BTC/USDTSuccessfully placed batch orders.
POST /sapi/v2/batchOrders HTTP/1.1
Host: openapi.coinlocally.com
X-CH-APIKEY: text
X-CH-TS: text
X-CH-SIGN: text
Content-Type: application/json
Accept: */*
Content-Length: 94
{
"symbol": "BTC/USDT",
"orders": [
{
"price": 1000,
"volume": 20.1,
"side": "BUY",
"batchType": "LIMIT"
}
]
}Successfully placed batch orders.
{
"idsString": [
"165964665990709251",
"165964665990709252",
"165964665990709253"
],
"ids": [
165964665990709250,
165964665990709250,
165964665990709250
]
}Retrieve the details of a specific order.
Weight: 1 (IP/UID)
System-generated Order ID
Client-generated Order ID (optional)
Trading pair symbol, e.g., BTC/USDT
Your API key
Timestamp of the request
Request signature
Successfully retrieved order information.
GET /sapi/v2/order?orderId=text&symbol=text HTTP/1.1
Host: openapi.coinlocally.com
X-CH-APIKEY: text
X-CH-TS: text
X-CH-SIGN: text
Accept: */*
Successfully retrieved order information.
{
"orderId": "499890200602846976",
"clientOrderId": "157432755564968",
"symbol": "BTC/USDT",
"price": "0.01",
"origQty": "50",
"executedQty": "0",
"avgPrice": "0",
"status": "NEW",
"type": "LIMIT",
"side": "BUY",
"transactTime": "1574327555669"
}Cancel an existing order by providing the order ID or clientOrderId.
Weight: 5 (IP/UID)
Your API key
Timestamp of the request
Request signature
Client-generated Order ID (optional)
354444heihieddadaOrder ID to cancel
499890200602846976Trading pair symbol
BTC/USDTSuccessfully canceled the order.
POST /sapi/v2/cancel HTTP/1.1
Host: openapi.coinlocally.com
X-CH-APIKEY: text
X-CH-TS: text
X-CH-SIGN: text
Content-Type: application/json
Accept: */*
Content-Length: 91
{
"newClientOrderId": "354444heihieddada",
"orderId": "499890200602846976",
"symbol": "BTC/USDT"
}Successfully canceled the order.
{
"symbol": "BTC/USDT",
"clientOrderId": "0",
"orderId": "499890200602846976",
"status": "CANCELED"
}Cancel multiple orders in a single request. The batch can contain up to 10 order IDs.
Weight: 10 (IP/UID)
Your API key
Timestamp of the request
Request signature
List of order IDs to cancel
Trading pair symbol
BTC/USDTResult of batch cancel operation
POST /sapi/v2/batchCancel HTTP/1.1
Host: openapi.coinlocally.com
X-CH-APIKEY: text
X-CH-TS: text
X-CH-SIGN: text
Content-Type: application/json
Accept: */*
Content-Length: 36
{
"orderIds": [
1
],
"symbol": "BTC/USDT"
}Result of batch cancel operation
{
"success": [
165964665990709250,
165964665990709250,
165964665990709250
],
"failed": [
165964665990709250
]
}Retrieve all currently open orders for a symbol. If symbol is not provided, orders for all symbols will be returned.
Weight: 1 (IP/UID) Symbol not provided: Weight = 80
Symbol name, e.g., BTC/USDT.
Weight (IP/UID):
- If
symbolis provided: 1 - If
symbolis not provided: 80
Number of orders to return (max 1000)
100Your API key
Timestamp of the request
Request signature
Successfully retrieved list of open orders.
GET /sapi/v2/openOrders HTTP/1.1
Host: openapi.coinlocally.com
X-CH-APIKEY: text
X-CH-TS: text
X-CH-SIGN: text
Accept: */*
Successfully retrieved list of open orders.
[
{
"orderId": 499902955766523650,
"orderIdString": "499902955766523648",
"symbol": "BTC/USDT",
"price": "0.01",
"origQty": "50",
"executedQty": "0",
"avgPrice": "0",
"status": "NEW",
"type": "LIMIT",
"side": "BUY",
"time": "1574329076202",
"stopPrice": 123321,
"isWorking": true
}
]Retrieve historical orders for an account.
Symbol name, e.g., BTC/USDT.
Weight (IP/UID): 20
- If
symbolis not provided: weight = 80
Max number of results (default: 50, max: 100)
50Start time in milliseconds
End time in milliseconds
Your API key
Timestamp of the request
Request signature
Successfully retrieved historical orders.
GET /sapi/v3/historyOrders HTTP/1.1
Host: openapi.coinlocally.com
X-CH-APIKEY: text
X-CH-TS: text
X-CH-SIGN: text
Accept: */*
Successfully retrieved historical orders.
[
{
"orderId": 499902955766523650,
"orderIdString": "499902955766523648",
"symbol": "BTC/USDT",
"price": "0.01",
"origQty": "50",
"executedQty": "0",
"avgPrice": "0",
"status": "NEW",
"type": "LIMIT",
"side": "BUY",
"time": "1574329076202",
"stopPrice": 123321,
"isWorking": true
}
]Get historical trade data.
Weight: 20 (IP/UID) Symbol not provided: Weight = 80
Supports up to 6 months of data. Time range between startTime and endTime must not exceed 7 days.
Symbol name, e.g., BTC/USDT.
Rate Limit Weight (IP/UID):
- Single symbol query: weight = 20
- Symbol not provided: weight = 80
Max number of results (default: 50, max: 100)
50Start time in milliseconds
End time in milliseconds
Your API key
Timestamp of the request
Request signature
Successfully retrieved trade history.
GET /sapi/v3/myTrades HTTP/1.1
Host: openapi.coinlocally.com
X-CH-APIKEY: text
X-CH-TS: text
X-CH-SIGN: text
Accept: */*
Successfully retrieved trade history.
[
{
"symbol": "ETH/BTC",
"id": 100211,
"bidId": 150695552109032480,
"askId": 150695552109032480,
"price": "4.00000100",
"qty": "12.00000000",
"time": 1499865549590,
"isBuyer": true,
"isMaker": false,
"feeCoin": "ETH",
"fee": "0.001",
"bidUserId": 23334,
"askUserId": 44112,
"isSelf": true
}
]Last updated