Skip to main content
POST
cURL

Authorizations

SPLASH-ACCESS-KEY
string
header
required

Your API key id. Keys are issued by Splash on request, never expire, and stay valid until Splash revokes them, which it does on request. See Authentication.

SPLASH-ACCESS-TIMESTAMP
string
header
required

Unix milliseconds, within 30 seconds of server time.

SPLASH-ACCESS-SIGNATURE
string
header
required

base64(HMAC-SHA256(secret, timestamp + METHOD + path + body)). See Authentication.

Body

application/json

A fill-or-kill order on one market. See Placing an order.

market_id
string
required

The market to trade: a market id from the market endpoints, including an alternate_lines[].id. An unknown id is 404 Market not found; a market that is not active is 400 Market is not active.

Example:

"pm_6ae1e3c09e1d4c7a2b5f80e3d6a9c412"

side
enum<string>
required

yes buys YES contracts and no buys NO contracts. The same field closes a position: holding YES, an order for no sells your YES contracts, and holding NO, an order for yes sells your NO contracts. A close must be for exactly the contracts you hold; a partial close or a flip to the other side is a 400. See Order sides.

Available options:
yes,
no
Example:

"yes"

quantity
integer
required

Whole contracts, at least 1. A contract pays $1 if its side wins. Opening more than the maximum trade in dollars is a 400; closing is never limited.

Required range: x >= 1
Example:

10

price
number
required

Your limit in dollars per contract for the side named in side, 0.01 to 0.99. A no order is priced in NO terms, so to sell 10 YES contracts at $0.66 you send side: "no", price: 0.34. The order fills completely at this price or better, or not at all. Fees are added on top of a buy and taken from a sale, not included in the price; see Fees and order cost. A sub-cent price is rounded to the cent in your favour before it reaches the exchange.

Required range: 0.01 <= x <= 0.99
Example:

0.59

time_in_force
enum<string>
required

Only FOK (fill or kill) is accepted. IOC is refused with 400 IOC orders are not yet supported. See Time in force.

Available options:
FOK
Example:

"FOK"

request_id
string
required

Your idempotency key: 1 to 64 characters from A-Z a-z 0-9 _ -; a UUID is ideal. One request_id never places more than one order: sending it again returns the order it already names, with its current status. After no response, poll it before sending it again; after an order-check refusal it is spent and you need a new one. A value another account used is 409 DUPLICATE_REQUEST_ID. See Order outcomes and retries.

Required string length: 1 - 64
Pattern: ^[A-Za-z0-9_-]+$
Example:

"3f1c2a9e-5b7d-4e0a-9c1d-8a6b2e4f7d10"

Response

Accepted. order_status is pending on a new order. A request_id you already used returns that order and its current status instead of placing another: cancelled when the first request was refused.

The order was accepted. Poll it until status is executed or cancelled.

status
string
required

Always success on a 200.

Allowed value: "success"
Example:

"success"

order_id
string
required

The order id (prefix ord_). Read the order with GET /orders/{id} or poll GET /orders?request_id=. A replay returns the original order's id.

Example:

"ord_6aedec658f3a61c2d94e07b5a1c6e2d9"

request_id
string
required

The request_id you sent.

Example:

"3f1c2a9e-5b7d-4e0a-9c1d-8a6b2e4f7d10"

order_status
enum<string>
required

pending on a new order: accepted, not filled. A request_id you already used reports that order's current status, and cancelled when the original request was refused (that request_id is spent). See Order statuses.

Available options:
pending,
executed,
cancelled
Example:

"pending"