mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 08:18:07 +00:00
2.3 KiB
2.3 KiB
Order
Rate limits
- 2400 requests/min or 40 requests/sec per IP address. (weight = 1)
{% hint style="info" %} See more details in API Rate limits {% endhint %}
Request
{% tabs %} {% tab title="Websocket" %} Connect
WEBSOCKET [GATEWAY_WEBSOCKET_ENDPOINT]
Message
{
"type": "order",
"product_id": 1,
"digest": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
{% endtab %}
{% tab title="REST (GET)" %} GET [GATEWAY_REST_ENDPOINT]/query?type=order&product_id={product_id}&digest={digest}
{% endtab %}
{% tab title="REST (POST)" %} POST [GATEWAY_REST_ENDPOINT]/query
Body
{
"type": "order",
"product_id": 1,
"digest": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
{% endtab %} {% endtabs %}
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| product_id | number | Yes | Id of spot / perp product for which to retrieve order. |
| digest | string | Yes | Order digest to retrieve. |
Response
{
"status": "success",
"data": {
"product_id": 1,
"sender": "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000",
"price_x18": "1000000000000000000",
"amount": "1000000000000000000",
"expiration": "2000000000",
"nonce": "1",
"unfilled_amount": "1000000000000000000",
"digest": "0x0000000000000000000000000000000000000000000000000000000000000000",
"placed_at": 1681951347,
"appendix": "1537",
"order_type": "ioc"
},
"request_type": "query_order",
}
{% hint style="info" %}
Note: that side of the order (buy/sell) is included in the sign of amount and unfilled_amount . They are positive if the order is a buy order, otherwise negative.
{% endhint %}