curl --request POST \
--url https://api.enterprise.sandbox.uphold.com/trading/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientOrderId": "8d5f1c0e-1b2a-4c3d-9e8f-77a0b1c2d3e4",
"side": "sell",
"type": "market",
"origin": {
"type": "account",
"id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
},
"destination": {
"type": "account",
"id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
},
"quantity": "0.5",
"timeInForce": "fok"
}
'{
"order": {
"id": "0192f3a1-7c2e-7d4b-9a1f-3e5c8b2d4f60",
"clientOrderId": "8d5f1c0e-1b2a-4c3d-9e8f-77a0b1c2d3e4",
"side": "sell",
"type": "limit",
"origin": {
"type": "account",
"id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
},
"destination": {
"type": "account",
"id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
},
"quantity": "0.5",
"price": "61500.00",
"timeInForce": "fok",
"status": "closed",
"execution": {
"quantity": "0.5",
"notional": "30959.57",
"averagePrice": "61919.14"
},
"timeline": [
{
"event": "created",
"createdAt": "2026-10-12T10:31:04.512Z"
},
{
"event": "filled",
"createdAt": "2026-10-12T10:31:05.104Z"
}
],
"createdAt": "2026-10-12T10:31:04.512Z",
"updatedAt": "2026-10-12T10:31:05.104Z"
}
}Orders
Create order
Create an order to buy or sell an asset.
POST
/
trading
/
orders
curl --request POST \
--url https://api.enterprise.sandbox.uphold.com/trading/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientOrderId": "8d5f1c0e-1b2a-4c3d-9e8f-77a0b1c2d3e4",
"side": "sell",
"type": "market",
"origin": {
"type": "account",
"id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
},
"destination": {
"type": "account",
"id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
},
"quantity": "0.5",
"timeInForce": "fok"
}
'{
"order": {
"id": "0192f3a1-7c2e-7d4b-9a1f-3e5c8b2d4f60",
"clientOrderId": "8d5f1c0e-1b2a-4c3d-9e8f-77a0b1c2d3e4",
"side": "sell",
"type": "limit",
"origin": {
"type": "account",
"id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
},
"destination": {
"type": "account",
"id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
},
"quantity": "0.5",
"price": "61500.00",
"timeInForce": "fok",
"status": "closed",
"execution": {
"quantity": "0.5",
"notional": "30959.57",
"averagePrice": "61919.14"
},
"timeline": [
{
"event": "created",
"createdAt": "2026-10-12T10:31:04.512Z"
},
{
"event": "filled",
"createdAt": "2026-10-12T10:31:05.104Z"
}
],
"createdAt": "2026-10-12T10:31:04.512Z",
"updatedAt": "2026-10-12T10:31:05.104Z"
}
}This endpoint is currently available in Sandbox only. It is not yet available in Production.
In Sandbox the orders you create are not stored, so a replayed
clientOrderId returns the same order id with a 201, and reusing it with a different payload is not refused.Accounts
Theorigin and destination objects identify the accounts the amount leaves and the proceeds are credited to. Both must belong to the same user, and the origin must hold the amount when the order is created. On a sell the origin is the base asset account and the destination the quote asset account, and a buy is the other way round.
Quantity and price
The order is sized by itsquantity, in the base asset of the pair. The assets traded are the ones of the origin and destination accounts, and the side says which of them is the base asset. A price is required on a limit order and not allowed on a market order. The venue holds the bounds the quantity and the price must respect, so an order that breaks one is refused with a 409 whose details name the rule and its limit. A pair that cannot be traded is refused with asset_pair_not_supported. Read more about type and side.
Client order id
TheclientOrderId is an idempotency key. Replaying it returns the existing order with a 200, and reusing it with a different payload is refused.
After a
5xx or a timeout, replay the same clientOrderId before anything else. Never send a new one until the replay has answered, or the amount may be traded twice.Order outcome
A201 means the order was created, not that it traded: check its status and timeline. A fill-or-kill order that could not fill in full comes back closed with a canceled event and its reason.
Read more about the order lifecycle.Authorizations
OAuth 2.0
Body
application/json
A unique key you choose for the order. Replaying it returns the existing order.
Required string length:
1 - 64Whether the base asset is bought or sold.
Available options:
buy, sell The type of the order.
Available options:
market, limit The account the traded amount leaves.
Show child attributes
Show child attributes
The account the proceeds are credited to.
Show child attributes
Show child attributes
The quantity of the base asset to trade.
Pattern:
^(?!0+(\.0+)?$)\d+(\.\d+)?$How long the order stays active. Only fok is supported for now.
Available options:
fok The limit price, in the quote asset per one unit of the base asset. Required on a limit order, and not allowed on a market order.
Pattern:
^(?!0+(\.0+)?$)\d+(\.\d+)?$Response
Order already existed.
Show child attributes
Show child attributes
Was this page helpful?