banking.v1.BookService

Place an order for the caller. Limit orders carry a `price` on the policy's tick; market orders leave it empty and are priced by the hub from the best opposite quote ± the policy's slippage, then run as an IOC limit at that price (an empty opposite side is FAILED_PRECONDITION). `size` is on the policy's lot.

Changed on

Refusals: book_open = false, or the caller below invest — FAILED_PRECONDITION; a post-only (alo) order that would cross, or one that would trade against the caller's own resting order — INVALID_ARGUMENT, nothing recorded; an insufficient available balance or holding — INVALID_ARGUMENT.

Idempotent by client_order_id, unique per caller: a retry of a timed-out call returns the order the id already names. The same id for a DIFFERENT order is ALREADY_EXISTS.

post/banking.v1.BookService/PlaceOrder

Request

  • The document declares no server URL.
  • Auth: none required

Headers

Connect-Protocol-Version1 required

Define the version of the Connect protocol

Connect-Timeout-Msnumber

Define the timeout, in ms

Request body

servicestring

the allocation

sidestring

buy | sell

kindstring

limit | market

tifstring

gtc | ioc | alo (post-only); market orders are always ioc

pricestring

decimal USDT per unit, on the tick; EMPTY for market

sizestring

decimal units, on the lot, > 0

client_order_idstring

required, 1..64 chars, unique per caller (the retry key)

Response

Success

idstring
servicestring
user_idstring
sidestring

buy | sell

kindstring

limit | market

tifstring

gtc | ioc | alo

pricestring

decimal USDT per unit

sizestring

decimal units

filledstring

decimal units

remainingstring

decimal units (size − filled)

avg_fill_pricestring

decimal USDT per unit; empty until the first fill

fee_paidstring

decimal USDT the caller paid as taker on this order

statestring

open | partially_filled | filled | cancelled | rejected

reject_reasonstring

free text; set exactly when state = rejected

client_order_idstring
cancel_reasonstring

Set exactly when state = cancelled: "" | user | ioc_remainder | market_remainder. user is the owner's own cancel; the other two are the hub cancelling what an IOC limit / a market order could not fill at once — such an order may still show filled > 0, which is what makes the reason worth carrying.

Changes