curl --request POST \
--url https://api-uat.dimetrades.com/api/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"marketId": 60497,
"side": "buy",
"type": "limit",
"contractSide": "yes",
"quantity": 10,
"price": 45,
"timeInForce": "GTC"
}
'{
"data": {
"orderId": "019f2d10-aaaa-733c-b8af-42a3620ee999",
"status": "pending",
"message": "Order submitted successfully.",
"clientOrderId": "my-app-order-8f3e2a1b"
},
"errors": []
}Place an order
Submits a new order. The gateway validates it, locks the required funds or
contracts in the database, and publishes it to the matching engine over
Kafka. A 200 means accepted for processing (status: pending) — the fill
result arrives asynchronously; poll GET /orders
or positions for the outcome.
Requires a KYC-verified account.
Field rules
quantityandpricemust be whole numbers.priceis in cents (1–99) and is required fortype: limit, and forbidden fortype: market. A fractional value (for examplequantity: 1.5orprice: 6.5) is rejected at placement with400/ code1002.type: limitallowstimeInForceofGTC,IOC,FOK, orGTT.type: marketallows onlyIOCorFOK, and forbidspriceandpostOnly.timeInForce: GTTrequiresexpireAt(unix ms); any other TIF forbids it.timeInForce: IOC/FOKforbidpostOnly.
Idempotency
Pass clientOrderId to make retries safe. It is checked (and, on a fresh
order, recorded) before any fund lock or matching-engine submission — a
replay with the same key returns the original order untouched, with
duplicate: true added to the response, rather than creating a second
order. See the idempotentRetry request example and the
idempotentReplay response example below.
curl --request POST \
--url https://api-uat.dimetrades.com/api/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"marketId": 60497,
"side": "buy",
"type": "limit",
"contractSide": "yes",
"quantity": 10,
"price": 45,
"timeInForce": "GTC"
}
'{
"data": {
"orderId": "019f2d10-aaaa-733c-b8af-42a3620ee999",
"status": "pending",
"message": "Order submitted successfully.",
"clientOrderId": "my-app-order-8f3e2a1b"
},
"errors": []
}Authorizations
The end user's JWT access token, sent as Authorization: Bearer <token>.
Obtain one from POST /partner/customers or POST /partner/customers/login
— both return it as token. It identifies which of your users a call
is made for, and is sent alongside your X-API-Key on every authenticated
endpoint.
Event discovery, categories, subcategories and scores are public and need no token.
ISV / partner credential — public half. Required on every request.
Identifies the integration partner (ISV) making the call. Issued by Dime
Trades when the ISV is onboarded and sent on every /partner/* endpoint:
X-API-Key: dt_pk_live_7f3c9a2e5b18
- On the two partner endpoints that create accounts or issue tokens (
POST /partner/customers,POST /partner/customers/login), it is accompanied byX-API-Secretand is the only authentication — there is no user token yet. - On every other partner endpoint it is sent alongside the user's
Authorization: Bearer <token>: the API key says which platform is calling, the bearer token says which user it is calling for.
Credentials are scoped to one or more brands; using a key with a brandId outside that scope returns 403. Staging and production keys are separate.
The key identifies your platform — treat it as a backend credential.
Body
Target market ID (integer). Standardized across all endpoints.
60497
Buy or sell.
buy, sell "buy"
Order type.
limit, market "limit"
Which side of the binary market the order is for.
yes, no "yes"
Number of contracts. Whole numbers only — a fractional value such as 1.5 is rejected with 400 and code 1002.
x >= 110
How long the order remains active.
GTC— good-till-canceled (rests on the book until canceled).IOC— immediate-or-cancel (fill what's available now, cancel the rest).FOK— fill-or-kill (fill entirely now or cancel the whole order).GTT— good-till-time (rests untilexpireAt).
GTC, IOC, FOK, GTT "GTC"
Optional parent event ID (integer). Standardized across all endpoints.
5454
Limit price in whole cents (1–99); a fractional value such as 6.5 is rejected with 400 and code 1002. Required for limit orders; forbidden for market orders.
1 <= x <= 9945
Reject the order if it would immediately match (maker-only). Not allowed with IOC/FOK.
Expiry time (unix ms). Required when timeInForce is GTT.
x >= 1Optional caller-supplied idempotency key, unique per user. See the "Idempotency" section below.
1 - 128"my-app-order-8f3e2a1b"
Response
Order accepted for processing.
Acknowledgement returned by POST /orders once the order is validated, its funds/contracts locked, and it is published to the matching engine. Not the final order state — poll GET /orders or positions for the outcome.
pending is an acknowledgement value, not an order status. It is never persisted, and no order ever holds it. The order row itself is created only once the matching engine's acceptance event is settled, at which point it appears in GET /orders as open — or, if the engine refused it, rejected.
Show child attributes
Show child attributes
