Create order
Place a limit order (trade key). client_order_id is required and idempotent: resending the same id with the same body returns the order already placed, never a second one. After a timeout or 503 EXCHANGE_UNAVAILABLE, retry with the SAME id.
curl --request POST \
--url https://api.updown.fast/trade-api/v1/portfolio/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"market_ticker": "<string>",
"price": "<string>",
"count": "<string>",
"client_order_id": "<string>",
"time_in_force": "good_till_canceled",
"post_only": false
}
'import requests
url = "https://api.updown.fast/trade-api/v1/portfolio/orders"
payload = {
"market_ticker": "<string>",
"price": "<string>",
"count": "<string>",
"client_order_id": "<string>",
"time_in_force": "good_till_canceled",
"post_only": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
market_ticker: '<string>',
price: '<string>',
count: '<string>',
client_order_id: '<string>',
time_in_force: 'good_till_canceled',
post_only: false
})
};
fetch('https://api.updown.fast/trade-api/v1/portfolio/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"order": {
"order_id": "<string>",
"client_order_id": "<string>",
"market_ticker": "<string>",
"outcome": "up",
"action": "buy",
"price": "<string>",
"time_in_force": "good_till_canceled",
"post_only": true,
"status": "resting",
"count": "<string>",
"fill_count": "<string>",
"remaining_count": "<string>",
"created_ts_ms": 4503599627370495,
"average_fill_price": "<string>",
"fees_paid": "<string>"
}
}{
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<string>"
}{
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<string>"
}{
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<string>"
}{
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<string>"
}{
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<string>"
}{
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<string>"
}Authorizations
An API key from your account: Authorization: Bearer udk_<live|test>_<id>_<secret>.
Body
Market ticker (one window of a series), e.g. "btc-15m-261002-1400-1415". Opaque.
^[a-z0-9][a-z0-9-]{0,63}-\d{6}-\d{4}-\d{4}(d\d{1,2})?$up, down buy, sell Contract price in dollars, "0.01"–"0.99" (v1: whole cents).
^0\.(0[1-9]|[1-9]\d)$Contracts, as a string (v1: whole contracts).
^(0|[1-9]\d*)$Your id for the order, unique per account. Retrying with the same id never places a second order.
^[A-Za-z0-9._:-]{1,64}$good_till_canceled: what doesn't fill rests on the book until it fills, you cancel it or the window closes. immediate_or_cancel: fills what it can now; the rest is cancelled.
good_till_canceled, immediate_or_cancel Response
The order, as the book holds it after this call.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.updown.fast/trade-api/v1/portfolio/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"market_ticker": "<string>",
"price": "<string>",
"count": "<string>",
"client_order_id": "<string>",
"time_in_force": "good_till_canceled",
"post_only": false
}
'import requests
url = "https://api.updown.fast/trade-api/v1/portfolio/orders"
payload = {
"market_ticker": "<string>",
"price": "<string>",
"count": "<string>",
"client_order_id": "<string>",
"time_in_force": "good_till_canceled",
"post_only": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
market_ticker: '<string>',
price: '<string>',
count: '<string>',
client_order_id: '<string>',
time_in_force: 'good_till_canceled',
post_only: false
})
};
fetch('https://api.updown.fast/trade-api/v1/portfolio/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"order": {
"order_id": "<string>",
"client_order_id": "<string>",
"market_ticker": "<string>",
"outcome": "up",
"action": "buy",
"price": "<string>",
"time_in_force": "good_till_canceled",
"post_only": true,
"status": "resting",
"count": "<string>",
"fill_count": "<string>",
"remaining_count": "<string>",
"created_ts_ms": 4503599627370495,
"average_fill_price": "<string>",
"fees_paid": "<string>"
}
}{
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<string>"
}{
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<string>"
}{
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<string>"
}{
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<string>"
}{
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<string>"
}{
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<string>"
}