API Documentation
Bitria External API v1.0 — Orders, Fills, Accounts, Positions
Base URL
https://api.bitria.io/api/v1Authentication
All requests must include the following 3 headers:
X-API-KEY: your-api-key
X-API-TIMESTAMP: Unix timestamp (ms)
X-API-SIGNATURE: HMAC-SHA256 signature
Signature Generation
HMAC-SHA256(timestamp + method + path + body, api_secret)Accounts
GET
/v1/accountsQuery account balances
Parameters
| Name | Type | Description |
|---|---|---|
tradeType* | string | SPOT | FUTURES | MARGIN |
coin | string | Filter by specific coin |
Responses
200Balance info400Missing tradeType
Orders
POST
/v1/ordersPlace an order
Request Body (JSON)
| Name | Type | Description |
|---|---|---|
symbol* | string | Trading pair (e.g. BTC-USDT) |
side* | string | BUY | SELL |
orderType* | string | MARKET | LIMIT |
tradeType* | string | SPOT | FUTURES | MARGIN |
quantity | number | Quantity for MARKET SELL or LIMIT orders |
price | number | Price for LIMIT orders |
funds | number | Order amount in USDT for MARKET BUY |
leverage | integer | Leverage for FUTURES (1–125) |
marginMode | string | CROSS | ISOLATED (FUTURES only) |
Responses
202Order accepted400Invalid parameters401Authentication failed429Rate limit exceeded
GET
/v1/ordersList orders
Parameters
| Name | Type | Description |
|---|---|---|
symbol | string | Filter by trading pair |
tradeType | string | SPOT | FUTURES | MARGIN |
status | string | PENDING | SUBMITTED | FILLED | CANCELLED |
page | integer | Page number (default: 1) |
limit | integer | Items per page (default: 20, max: 100) |
Responses
200Order list
GET
/v1/orders/{orderId}Get order details
Parameters
| Name | Type | Description |
|---|---|---|
orderId* | string | Order ID |
Responses
200Order details with fills404Order not found
POST
/v1/orders/{orderId}/cancelCancel an order
Parameters
| Name | Type | Description |
|---|---|---|
orderId* | string | Order ID |
Responses
200Cancelled404Order not found409Cannot cancel (already filled)
Fills
GET
/v1/fillsQuery fill history
Parameters
| Name | Type | Description |
|---|---|---|
symbol | string | Filter by trading pair |
tradeType | string | SPOT | FUTURES | MARGIN |
orderId | string | Filter by specific order |
startTime | integer | Start time (unix ms) |
endTime | integer | End time (unix ms) |
page | integer | Page number (default: 1) |
limit | integer | Items per page (default: 20, max: 100) |
Responses
200Fill history
Positions
GET
/v1/positionsQuery open positions
Parameters
| Name | Type | Description |
|---|---|---|
tradeType | string | FUTURES | MARGIN |
symbol | string | Filter by trading pair |
Responses
200Open positions
Getting Started
Create an API key from Account > Settings > API Management. Store your API secret securely — it is only shown once at creation. For integration support, contact support@bitria.com.