Skip to main content
GET
GET /limit-order/{id} returns one limit order created with your API key. Poll it to follow the order from pending to a final status: completed, failed or cancelled. A cancelled order stays readable.

Statuses

Treat any other value as not final, and keep polling.

Poll until a final status

  • Poll every 15 to 60 seconds, and stop at completed, failed or cancelled.
  • Cap the poll too, for example an hour after the order’s expired. No documented status marks an expired order, so an order can stay at a status that isn’t final: check it again later, or cancel it.
  • A pending order can wait a long time for the market to reach priceTrigger. Run the poll from a background job, not while a user waits.
  • To follow several orders of one maker, poll GET /limit-order with accountTo instead: one call returns all of them.
  • GET is safe to repeat. Sign every request again, as the reference helpers do: each set of signed headers works once.

After a final status

  • completed: the order doesn’t report the amount received. Read it from the txHash transaction on chainId, with your RPC or the chain’s block explorer.
  • failed: reasonFail explains why. A failed order doesn’t run again, so fix the cause, for example the maker’s balance or allowance, and create a new order if you still want the trade.
  • cancelled: cancelling doesn’t change the maker’s allowance. Cancel a limit order shows how to lower it.

Not found

A 404 NOT_FOUND with the message “Limit order not found” means no order with this ID belongs to your API key: the ID doesn’t exist, or another API key created the order. A 404 NOT_FOUND whose message starts with No route for means the path or method is wrong.

Authorizations

x-api-key-id
string
header
required

Your API key ID (UUID). See Sign requests.

x-value-info
string
header
required

Base64 of timestamp + "\n" + nonce + "\n" + bodyHash, where timestamp is Unix seconds, nonce is 24 new hexadecimal characters and bodyHash is the unpadded base64url SHA-256 of the canonical body.

x-passphrase
string
header
required

Your account passphrase. Treat it like the secret key.

x-signature
string
header
required

Lowercase hex HMAC-SHA256 (signature v2), keyed with your secret key string (UTF-8, not decoded), of seven lines joined with \n, with no trailing newline: OLPX-HMAC-SHA256-V2, timestamp, nonce, the uppercase method, path, canonicalQuery and bodyHash. path is the request path including /api/v1, without the query string, for example /api/v1/limit-order/<id>. canonicalQuery is the query parameters decoded (+ is a space), sorted by key and then by value, re-encoded per RFC 3986 and joined with &, or the empty string when there is no query. Headers signed for one request are rejected on any other. See Sign requests.

Path Parameters

id
string
required

Limit order ID, as returned when it was created.

Response

The order.

success
enum<boolean>
required
Available options:
true
data
object
required

A limit order. Olympex can add fields; ignore the ones you don't use.

meta
object
required