Skip to Content
raikiri

Client API

Try the signed API from Python or C++ on a paper market.

apid is the signed API that programs use to place orders and follow them. The open framework runs it against a paper market. Connecting it to real accounts is part of raikiri Pro.

Start the paper market

The paper deployment runs the real apid in front of a made-up market. No money and no exchange are involved.

cmake --build build/dev-asan --target apid
(cd sdk/python && uv sync)
uv run --project sdk/python python examples/paper/paper.py

It prints three export lines. Paste them into another shell and run an example:

uv run --project sdk/python python examples/python/place_and_cancel.py

Place an order

from raikiri import Client

client = Client()  # RAIKIRI_API_URL, RAIKIRI_API_KEY, RAIKIRI_API_SECRET
btc = client.market.find("BTC/USDT", account="binance")
order = client.orders.limit(btc, "buy", "0.001", "60000")
print(client.orders.get(order.id).status)

The C++ SDK has the same surface. Prices and sizes are exact decimals in both. The examples cover streams, TWAP, smart routing, an option chain and a market maker, in both languages.

Know before you use it

  • An accepted call means the order was queued. A risk refusal comes after it and shows as status denied.
  • Every call that changes something carries an idempotency key, so a retry with the same key does not trade twice.
  • OutcomeUnknown means the call may have gone through. Check your orders before sending it again.
  • Positions are counted from the client's own fills. Balances belong to the account and are shared by its clients.

Every route, field and error code is in client-api.yaml.

Edit this page on GitHub

On this page