Appearance
REST reference
Documents gateway spec version 1.4.0.
Generated from the public OpenAPI spec; the machine-readable source is served at /openapi.json (SDK generators and try-it tools read that). Every money, price, rate, duration and count field crosses the wire as a decimal string, and its unit (x-hardbasis-unit) is shown beside it — see Wire encoding. Base URL and auth are on the Overview and Authentication pages.
System
GET /healthz
Liveness + DB reachability probe.
Auth: none (public)
Responses
- 200 — OK
ok· boolean · requireddb· boolean · requiredtsMs· string · unitms· required
- 503 — Service Unavailable
ok· boolean · requireddb· boolean · requiredtsMs· string · unitms· required
Example 200 response:
json
{
"ok": true,
"db": true,
"tsMs": "100000"
}GET /deployment
Deployment posture (prod/testnet) — drives the testnet banner.
Auth: none (public)
Responses
- 200 — OK
deployment· enum(prod,testnet) · required
Example 200 response:
json
{
"deployment": "prod"
}GET /v1/limits
The caller's rate-limit tier + per-budget config and remaining.
Auth: API key (x-api-key)
Responses
- 200 — OK
tier· string · requiredbudgets· map(enum(read,order,withdraw) → object) · required- each enum(
read,order,withdraw) key → object:limitPerMin· integer · requiredburst· integer · requiredremaining· integer · required
- each enum(
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"tier": "string",
"budgets": {
"read": {
"limitPerMin": 0,
"burst": 0,
"remaining": 0
}
}
}Proof of Reserves
GET /por
Proof-of-Reserves snapshot (figures, staleness, liability root, vault exposure).
Auth: none (public)
Responses
- 200 — OK
tsMs· string · unitms· requiredageMs· string · unitms· requiredstale· boolean · requiredstaleAfterMs· string · unitms· requiredstatus· enum(clean,warn,page) · requireddriftMsat· string · unitmsat· requiredconsolidationVerified· boolean · requiredsnapshot· any · requiredhistory· object[] · requiredtsMs· string · unitms· requiredstatus· string · requireddriftMsat· string · unitmsat· required
liability· object · requiredrootHash· string · requiredtotalMsat· string · unitmsat· requiredleafCount· integer · requiredrootSaltHex· string · requiredtsMs· string · unitms· required
vaultExposure· object · requirednetPctOfEquityQ9· string | null · unitq9· requiredquantumQ9· string · unitq9· requiredtsMs· string · unitms· requiredconsolidationVerified· boolean · required
- 404 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"tsMs": "100000",
"ageMs": "100000",
"stale": true,
"staleAfterMs": "100000",
"status": "clean",
"driftMsat": "100000",
"consolidationVerified": true,
"snapshot": null,
"history": [
{
"tsMs": "100000",
"status": "string",
"driftMsat": "100000"
}
],
"liability": {
"rootHash": "string",
"totalMsat": "100000",
"leafCount": 0,
"rootSaltHex": "string",
"tsMs": "100000"
},
"vaultExposure": {
"netPctOfEquityQ9": "100000",
"quantumQ9": "100000",
"tsMs": "100000",
"consolidationVerified": true
}
}GET /por/dashboard
Proof-of-Reserves dashboard (HTML, engine-served).
Auth: none (public)
Responses
- 200 — OK
GET /v1/por/proof
Merkle inclusion proof of the account's liability in the current PoR tree.
Auth: API key (x-api-key)
Responses
- 200 — OK
rootHash· string · requiredtotalMsat· string · unitmsat· requiredrootSaltHex· string · requiredtreeTsMs· string · unitms· requiredleaf· object · requiredaccountTag· string · requiredbalanceMsat· string · unitmsat· requiredindex· integer · required
path· object[] · requiredsiblingHash· string · requiredsiblingSumMsat· string · unitmsat· requiredsiblingOnLeft· boolean · required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 404 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"rootHash": "string",
"totalMsat": "100000",
"rootSaltHex": "string",
"treeTsMs": "100000",
"leaf": {
"accountTag": "string",
"balanceMsat": "100000",
"index": 0
},
"path": [
{
"siblingHash": "string",
"siblingSumMsat": "100000",
"siblingOnLeft": true
}
]
}Markets
GET /v1/markets
All markets (skew quantized §13).
Auth: none (public)
Responses
- 200 — OK
Example 200 response:
json
[
{
"marketId": "string",
"underlying": "string",
"contractType": "inverse",
"oracleFeedId": "string",
"quantoMultiplierMsat": "100000",
"status": "live",
"tickSizeQ8": "100000",
"priceDp": "100000",
"minOrderContracts": "100000",
"maxOrderContracts": "100000",
"takerFeeQ9": "100000",
"maxLeverage": "100000",
"imRateQ9": "100000",
"mmRateQ9": "100000",
"baseSpreadQ9": "100000",
"fundingRateHourlyQ9": "100000",
"nextFundingTsMs": "100000",
"oracleStalenessMs": "100000",
"openInterestContracts": "100000",
"skewQ9": "100000",
"lastPrice": {
"midQ8": "100000",
"tsMs": "100000"
}
}
]GET /v1/markets/{id}
One market.
Auth: none (public)
Parameters
id(path), required — string
Responses
- 200 — OK
marketId· string · requiredunderlying· string · requiredcontractType· enum(inverse,quanto) · requiredoracleFeedId· string · requiredquantoMultiplierMsat· string | null · unitmsat· requiredstatus· enum(live,reduce_only,halted) · requiredtickSizeQ8· string · unitq8· requiredpriceDp· string · unitint· requiredminOrderContracts· string · unitcontracts· requiredmaxOrderContracts· string · unitcontracts· requiredtakerFeeQ9· string · unitq9· requiredmaxLeverage· string · unitint· requiredimRateQ9· string · unitq9· requiredmmRateQ9· string · unitq9· requiredbaseSpreadQ9· string · unitq9· requiredfundingRateHourlyQ9· string · unitq9· requirednextFundingTsMs· string · unitms· requiredoracleStalenessMs· string · unitms· requiredopenInterestContracts· string · unitcontracts· requiredskewQ9· string · unitq9· requiredlastPrice· object | null · required
- 404 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"marketId": "string",
"underlying": "string",
"contractType": "inverse",
"oracleFeedId": "string",
"quantoMultiplierMsat": "100000",
"status": "live",
"tickSizeQ8": "100000",
"priceDp": "100000",
"minOrderContracts": "100000",
"maxOrderContracts": "100000",
"takerFeeQ9": "100000",
"maxLeverage": "100000",
"imRateQ9": "100000",
"mmRateQ9": "100000",
"baseSpreadQ9": "100000",
"fundingRateHourlyQ9": "100000",
"nextFundingTsMs": "100000",
"oracleStalenessMs": "100000",
"openInterestContracts": "100000",
"skewQ9": "100000",
"lastPrice": {
"midQ8": "100000",
"tsMs": "100000"
}
}GET /v1/markets/{id}/funding
Last 100 funding boundaries (skew quantized §E).
Auth: none (public)
Parameters
id(path), required — string
Responses
- 200 — OK
Example 200 response:
json
[
{
"tsMs": "100000",
"rateQ9": "100000",
"skewQ9": "100000"
}
]GET /v1/markets/{id}/stats24h
24h volume + traded hi/lo, derived from fills.
Auth: none (public)
Parameters
id(path), required — string
Responses
- 200 — OK
marketId· string · requiredwindowMs· string · unitms· requiredbasis· string · requiredfills· integer · requiredvolumeContracts· string · unitcontracts· requiredhiQ8· string | null · unitq8· requiredloQ8· string | null · unitq8· requiredtruncated· boolean · required
- 404 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"marketId": "string",
"windowMs": "100000",
"basis": "string",
"fills": 0,
"volumeContracts": "100000",
"hiQ8": "100000",
"loQ8": "100000",
"truncated": true
}GET /v1/markets/{id}/candles
OHLC candles (interval 60, 3600 or 86400).
Auth: none (public)
Parameters
id(path), required — stringinterval(query) — enum(60,3600,86400)limit(query) — string
Responses
- 200 — OK
interval· number · requiredcandles· object[] · requiredtsMs· string · unitms· requiredoQ8· string · unitq8· requiredhQ8· string · unitq8· requiredlQ8· string · unitq8· requiredcQ8· string · unitq8· requiredprints· integer · requiredseeded· boolean · optionalvolumeContracts· string · unitcontracts· optional
- 404 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"interval": 0,
"candles": [
{
"tsMs": "100000",
"oQ8": "100000",
"hQ8": "100000",
"lQ8": "100000",
"cQ8": "100000",
"prints": 0,
"seeded": true,
"volumeContracts": "100000"
}
]
}GET /v1/public/ticker
Landing-page ticker (microcached).
Auth: none (public)
Responses
- 200 — OK
asOfMs· string · unitms· requiredtickers· object[] · requiredmarketId· string · requiredlast· object | null · requiredstalenessMs· string · unitms· required
Example 200 response:
json
{
"asOfMs": "100000",
"tickers": [
{
"marketId": "string",
"last": {
"midQ8": "100000",
"tsMs": "100000"
},
"stalenessMs": "100000"
}
]
}Account
GET /v1/account
Account balances, rail address, per-path deposit fees.
Auth: API key (x-api-key)
Responses
- 200 — OK
accountId· string · requireduserId· string · requiredrailAddress· string · requiredautoSweepThresholdMsat· string | null · unitmsat· requiredfreeMsat· string · unitmsat· requiredreservedMsat· string · unitmsat· requireddepositFees· object[] · requiredpath· enum(spark,l1,lightning) · requireddescription· string · requiredrecommendedMinimumSats· string · unitsats· optional
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"accountId": "string",
"userId": "string",
"railAddress": "string",
"autoSweepThresholdMsat": "100000",
"freeMsat": "100000",
"reservedMsat": "100000",
"depositFees": [
{
"path": "spark",
"description": "string",
"recommendedMinimumSats": "100000"
}
]
}GET /v1/positions
Open positions for the account.
Auth: API key (x-api-key)
Responses
- 200 — OK
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
[
{
"marketId": "string",
"side": "long",
"contracts": "100000",
"entryPriceQ8": "100000",
"marginMsat": "100000",
"fundingClockTsMs": "100000"
}
]GET /v1/fills
Fills history (cursor-paginated).
Auth: API key (x-api-key)
Parameters
limit(query) — stringbeforeSeq(query) — string
Responses
- 200 — OK
fills· object[] · requiredorderId· string · requiredaccountId· string · requiredmarketId· string · requiredside· enum(buy,sell) · requiredclosedContracts· string · unitcontracts· requiredopenedContracts· string · unitcontracts· requiredexecPriceQ8· string · unitq8· requiredoracle· object · requiredspreadQ9· string · unitq9· requiredtradeNotionalMsat· string · unitmsat· requiredfeeMsat· string · unitmsat· requiredimpactMsat· string · unitmsat· requiredrebateDivertedMsat· string · unitmsat· requiredrealizedPnlMsat· string · unitmsat· requiredfundingSettledMsat· string · unitmsat· requiredreleasedMarginMsat· string · unitmsat· requiredreservedMarginMsat· string · unitmsat· requireddeficitMsat· string · unitmsat· requiredreferral· object | null · optionalpositionAfter· object | null · requiredseq· string · unitseq· requiredtsMs· string · unitms· required
nextBeforeSeq· string | null · unitseq· required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"fills": [
{
"orderId": "string",
"accountId": "string",
"marketId": "string",
"side": "buy",
"closedContracts": "100000",
"openedContracts": "100000",
"execPriceQ8": "100000",
"oracle": {
"midQ8": "100000",
"confQ9": "100000",
"tsMs": "100000"
},
"spreadQ9": "100000",
"tradeNotionalMsat": "100000",
"feeMsat": "100000",
"impactMsat": "100000",
"rebateDivertedMsat": "100000",
"realizedPnlMsat": "100000",
"fundingSettledMsat": "100000",
"releasedMarginMsat": "100000",
"reservedMarginMsat": "100000",
"deficitMsat": "100000",
"referral": {
"code": "string",
"grossFeeMsat": "100000",
"discountMsat": "100000",
"rewardMsat": "100000",
"policyVersion": "100000"
},
"positionAfter": {
"side": "long",
"contracts": "100000",
"entryPriceQ8": "100000",
"marginMsat": "100000"
},
"seq": "100000",
"tsMs": "100000"
}
],
"nextBeforeSeq": "100000"
}Deposits
POST /v1/deposit-invoices
Create a Lightning deposit invoice.
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Request body
amountMsat· string · unitmsat· optionalexpirySeconds· integer · optionalmemo· string · optional
json
{
"amountMsat": "100000",
"expirySeconds": 0,
"memo": "string"
}Responses
- 201 — Created
invoice· string · requiredpaymentRef· string · requiredexpiresAtMs· string · unitms· requireddepositFees· object[] · requiredpath· enum(spark,l1,lightning) · requireddescription· string · requiredrecommendedMinimumSats· string · unitsats· optional
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 201 response:
json
{
"invoice": "string",
"paymentRef": "string",
"expiresAtMs": "100000",
"depositFees": [
{
"path": "spark",
"description": "string",
"recommendedMinimumSats": "100000"
}
]
}GET /v1/deposits
Deposit history (cursor-paginated).
Auth: API key (x-api-key)
Parameters
limit(query) — stringbeforeSeq(query) — string
Responses
- 200 — OK
deposits· object[] · requiredaccountId· string · requiredamountMsat· string · unitmsat· requiredfeeMsat· string · unitmsat· requiredrailRef· string · requiredseq· string · unitseq· requiredtsMs· string · unitms· required
nextBeforeSeq· string | null · unitseq· required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"deposits": [
{
"accountId": "string",
"amountMsat": "100000",
"feeMsat": "100000",
"railRef": "string",
"seq": "100000",
"tsMs": "100000"
}
],
"nextBeforeSeq": "100000"
}Sessions & keys
GET /v1/sessions
The account's live/revoked sessions (never the key value).
Auth: API key (x-api-key)
Responses
- 200 — OK
tsMs· string · unitms· requiredsessions· object[] · requiredkeyId· string · requiredaccountId· string · requiredlabel· string · requiredscopes· enum(read,trade,withdraw,admin-sessions)[] · requireduaClass· string | null · requiredipCountryFirst· string | null · requiredcreatedTsMs· string · unitms· requiredlastSeenTsMs· string | null · unitms· requiredrevokedTsMs· string | null · unitms· requiredrevokedBy· string | null · requiredrevokeReason· string | null · requiredcurrent· string · unitint· required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"tsMs": "100000",
"sessions": [
{
"keyId": "string",
"accountId": "string",
"label": "string",
"scopes": [
"read"
],
"uaClass": "string",
"ipCountryFirst": "string",
"createdTsMs": "100000",
"lastSeenTsMs": "100000",
"revokedTsMs": "100000",
"revokedBy": "string",
"revokeReason": "string",
"current": "100000"
}
]
}POST /v1/sessions
Mint a new session key (delegate key primitive).
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Request body
label· string · optionalscopes· enum(read,trade,withdraw,admin-sessions)[] · optional
json
{
"label": "string",
"scopes": [
"read"
]
}Responses
- 201 — Created
apiKey· string · optionalkeyId· string · requiredscopes· enum(read,trade,withdraw,admin-sessions)[] · required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 201 response:
json
{
"apiKey": "string",
"keyId": "string",
"scopes": [
"read"
]
}POST /v1/sessions/revoke
Revoke one session or all-but-current.
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Request body
keyId· string · optionalallButCurrent· boolean · optional
json
{
"keyId": "string",
"allButCurrent": true
}Responses
- 200 — OK
revoked· string[] · required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 404 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"revoked": [
"string"
]
}Liquidations
GET /v1/liquidations
Liquidation history (cursor-paginated).
Auth: API key (x-api-key)
Parameters
limit(query) — stringbeforeSeq(query) — string
Responses
- 200 — OK
liquidations· object[] · requiredaccountId· string · requiredpositionId· string · requiredmarketId· string · requiredside· enum(long,short) · requiredclosedContracts· string · unitcontracts· requiredpartial· boolean · requiredexecPriceQ8· string · unitq8· requiredoracle· object · requiredspreadQ9· string · unitq9· requiredrealizedPnlMsat· string · unitmsat· requiredfundingSettledMsat· string · unitmsat· requiredpenaltyMsat· string · unitmsat· requiredremainderMsat· string · unitmsat· optionaldeficitMsat· string · unitmsat· requiredinsuranceCoveredMsat· string · unitmsat· requiredadlTriggered· boolean · requiredremainingContracts· string · unitcontracts· requiredremainingMarginMsat· string · unitmsat· requiredseq· string · unitseq· requiredtsMs· string · unitms· required
nextBeforeSeq· string | null · unitseq· required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"liquidations": [
{
"accountId": "string",
"positionId": "string",
"marketId": "string",
"side": "long",
"closedContracts": "100000",
"partial": true,
"execPriceQ8": "100000",
"oracle": {
"midQ8": "100000",
"confQ9": "100000",
"tsMs": "100000"
},
"spreadQ9": "100000",
"realizedPnlMsat": "100000",
"fundingSettledMsat": "100000",
"penaltyMsat": "100000",
"remainderMsat": "100000",
"deficitMsat": "100000",
"insuranceCoveredMsat": "100000",
"adlTriggered": true,
"remainingContracts": "100000",
"remainingMarginMsat": "100000",
"seq": "100000",
"tsMs": "100000"
}
],
"nextBeforeSeq": "100000"
}Funding
GET /v1/funding
Funding-flow history (cursor-paginated).
Auth: API key (x-api-key)
Parameters
limit(query) — stringbeforeSeq(query) — string
Responses
- 200 — OK
funding· object[] · requiredseq· string · unitseq· requiredboundaryTsMs· string · unitms· requiredmarketId· string · requiredrateQ9· string · unitq9· requiredflowMsat· string · unitmsat· requiredpaidMsat· string · unitmsat· requiredpositionId· string · required
nextBeforeSeq· string | null · unitseq· required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"funding": [
{
"seq": "100000",
"boundaryTsMs": "100000",
"marketId": "string",
"rateQ9": "100000",
"flowMsat": "100000",
"paidMsat": "100000",
"positionId": "string"
}
],
"nextBeforeSeq": "100000"
}Orders
GET /v1/orders
Orders (optionally ?status= filtered), or ?state=resting|armed triggers (cursor-paginated).
Auth: API key (x-api-key)
Parameters
state(query) — enum(resting,armed)status(query) — enum(accepted,filled,canceled,rejected)[]limit(query) — stringbeforeSeq(query) — string
Responses
- 200 — OK
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 402 — 402 — reserved for L402/Lightning-metered access (PAPI-8). Not returned today; documented so it lands additively.
error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
POST /v1/orders
Submit an order, bracket, or trigger (idempotency key = order id).
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Request body
marketId· string · requiredside· enum(buy,sell) · requiredtype· enum(market,limit,stop_market,take_profit_market) · requiredcontracts· string · unitcontracts· requiredlimitPriceQ8· string · unitq8· optionaltriggerPriceQ8· string · unitq8· optionalmaxSlippageQ9· string · unitq9· optionalreduceOnly· boolean · requiredtrigger· object · optionalkind· enum(entry,stop,take_profit) · requiredlevel· string · unitq8· required
bracket· object · optionalentryKind· enum(market,trigger) · requiredentryLevel· string · unitq8· optionalstopLevel· string · unitq8· optionaltakeProfitLevel· string · unitq8· optionalstopContracts· string · unitcontracts· optionaltakeProfitContracts· string · unitcontracts· optional
json
{
"marketId": "string",
"side": "buy",
"type": "market",
"contracts": "100000",
"limitPriceQ8": "100000",
"triggerPriceQ8": "100000",
"maxSlippageQ9": "100000",
"reduceOnly": true,
"trigger": {
"kind": "entry",
"level": "100000"
},
"bracket": {
"entryKind": "market",
"entryLevel": "100000",
"stopLevel": "100000",
"takeProfitLevel": "100000",
"stopContracts": "100000",
"takeProfitContracts": "100000"
}
}Responses
- 201 — Created
orderId· string · requiredstatus· enum(accepted,filled,canceled,rejected,resting,working) · required
- 400 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 402 — 402 — reserved for L402/Lightning-metered access (PAPI-8). Not returned today; documented so it lands additively.
error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 201 response:
json
{
"orderId": "string",
"status": "accepted"
}GET /v1/orders/{id}
One order's status.
Auth: API key (x-api-key)
Parameters
id(path), required — string
Responses
- 200 — OK
orderId· string · requiredmarketId· string · requiredside· enum(buy,sell) · requiredtype· enum(market,limit,stop_market,take_profit_market) · requiredcontracts· string · unitcontracts· requiredstatus· enum(accepted,filled,canceled,rejected) · requiredreason· string | null · required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 404 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"orderId": "string",
"marketId": "string",
"side": "buy",
"type": "market",
"contracts": "100000",
"status": "accepted",
"reason": "string"
}DELETE /v1/orders/{id}
Cancel an order / trigger / bracket by id.
Auth: API key (x-api-key)
Parameters
id(path), required — stringidempotency-key(header), required — string
Responses
- 200 — OK
orderId· string · requiredcanceled· boolean · required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"orderId": "string",
"canceled": true
}POST /v1/cancel-all-after
Dead-man's-switch: arm/refresh/disarm cancel-all-after.
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Request body
timeoutMs· string · unitms· required
json
{
"timeoutMs": "100000"
}Responses
- 200 — OK
armed· boolean · requireddeadlineTsMs· string | null · unitms· required
- 400 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"armed": true,
"deadlineTsMs": "100000"
}Withdrawals
POST /v1/withdrawals/quote
Fee quote + wrong-address first-seen check.
Auth: API key (x-api-key)
Request body
invoice· string · optionaltoAddress· string · optionalamountMsat· string · unitmsat· optional
json
{
"invoice": "string",
"toAddress": "string",
"amountMsat": "100000"
}Responses
- 200 — OK
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
GET /v1/withdrawals
Withdrawal history (cursor-paginated).
Auth: API key (x-api-key)
Parameters
limit(query) — stringbeforeSeq(query) — string
Responses
- 200 — OK
withdrawals· object[] · requiredidempotencyKey· string · requiredamountMsat· string · unitmsat· requiredfeeMsat· string | null · unitmsat· requiredstate· enum(requested,queued,paid,returned) · requiredpath· enum(spark,lightning) · requiredqueuedReason· string | null · requiredrailRef· string | null · requiredrequestedTsMs· string · unitms· requiredpaidTsMs· string | null · unitms· required
nextBeforeSeq· string | null · unitseq· required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 402 — 402 — reserved for L402/Lightning-metered access (PAPI-8). Not returned today; documented so it lands additively.
error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"withdrawals": [
{
"idempotencyKey": "string",
"amountMsat": "100000",
"feeMsat": "100000",
"state": "requested",
"path": "spark",
"queuedReason": "string",
"railRef": "string",
"requestedTsMs": "100000",
"paidTsMs": "100000"
}
],
"nextBeforeSeq": "100000"
}POST /v1/withdrawals
Withdraw free balance (spark or lightning).
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Request body
amountMsat· string · unitmsat· requiredtoAddress· string · optionalconfirmToken· string · optional
json
{
"amountMsat": "100000",
"toAddress": "string",
"confirmToken": "string"
}Responses
- 201 — Created
railRef· string · requiredqueued· boolean · required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 402 — 402 — reserved for L402/Lightning-metered access (PAPI-8). Not returned today; documented so it lands additively.
error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 428 — Confirmation Required
error· string · requiredcode· string · optionalreason· string · requiredfirstSeen· boolean · requiredconfirmThresholdMsat· string · unitmsat· required
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 201 response:
json
{
"railRef": "string",
"queued": true
}Referral
GET /v1/referral
The account's referral status.
Auth: API key (x-api-key)
Responses
- 200 — OK
tsMs· string · unitms· requiredprogram· object · requiredenabled· boolean · requiredpaused· boolean · requiredpolicyVersion· string · unitint· required
policy· object · requiredshareQ9· string · unitq9· requiredshareTiers· object[] · requiredrefereeDiscountQ9· string · unitq9· requiredrefereeDiscountWindowMs· string · unitms· requiredrefereeDiscountVolumeCapMsat· string | null · unitmsat· requiredrewardWindowMs· string · unitms· requiredholdbackMs· string · unitms· requiredminClaimMsat· string · unitmsat· required
eligibility· object · requiredeligible· boolean · requiredgates· object[] · required
code· object | null · requiredreferredBy· object | null · requiredstats· object | null · requiredbindWindow· object | null · required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"tsMs": "100000",
"program": {
"enabled": true,
"paused": true,
"policyVersion": "100000"
},
"policy": {
"shareQ9": "100000",
"shareTiers": [
{
"minActiveReferees": "100000",
"shareQ9": "100000"
}
],
"refereeDiscountQ9": "100000",
"refereeDiscountWindowMs": "100000",
"refereeDiscountVolumeCapMsat": "100000",
"rewardWindowMs": "100000",
"holdbackMs": "100000",
"minClaimMsat": "100000"
},
"eligibility": {
"eligible": true,
"gates": [
{
"gate": "string",
"met": true,
"requiredMs": "100000",
"currentMs": "100000",
"requiredMsat": "100000",
"currentMsat": "100000",
"required": "100000",
"current": "100000"
}
]
},
"code": {
"code": "string",
"createdTsMs": "100000",
"disabled": true
},
"referredBy": {
"code": "string",
"boundTsMs": "100000",
"discountQ9": "100000",
"discountExpiresTsMs": "100000",
"discountVolumeCapMsat": "100000",
"discountVolumeUsedMsat": "100000",
"discountActive": true
},
"stats": {
"referees": "100000",
"activeReferees": "100000",
"tier": {
"shareQ9": "100000"
},
"lifetimeEarnedMsat": "100000",
"earned30dMsat": "100000",
"claimableMsat": "100000",
"pendingHoldbackMsat": "100000",
"claimedMsat": "100000",
"forfeitedMsat": "100000"
},
"bindWindow": {
"openUntilTsMs": "100000"
}
}POST /v1/referral/code
Create the account's referral code.
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Request body
code· string · optional
json
{
"code": "string"
}Responses
- 201 — Created
code· string · requiredcreatedTsMs· string · unitms· required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 201 response:
json
{
"code": "string",
"createdTsMs": "100000"
}POST /v1/referral/bind
Bind to a referrer's code (grace window).
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Request body
code· string · required
json
{
"code": "string"
}Responses
- 200 — OK
bound· boolean · requiredreferredBy· object · requiredcode· string · requiredboundTsMs· string · unitms· requireddiscountQ9· string · unitq9· requireddiscountExpiresTsMs· string · unitms· requireddiscountVolumeCapMsat· string | null · unitmsat· requireddiscountVolumeUsedMsat· string · unitmsat· requireddiscountActive· boolean · required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"bound": true,
"referredBy": {
"code": "string",
"boundTsMs": "100000",
"discountQ9": "100000",
"discountExpiresTsMs": "100000",
"discountVolumeCapMsat": "100000",
"discountVolumeUsedMsat": "100000",
"discountActive": true
}
}GET /v1/referral/earnings
Referral earnings (cursor-paginated).
Auth: API key (x-api-key)
Parameters
limit(query) — stringbeforeSeq(query) — string
Responses
- 200 — OK
earnings· object[] · requiredseq· string · unitseq· requiredfillSeq· string | null · unitseq· requiredtsMs· string · unitms· requiredref· string | null · requiredgrossFeeMsat· string · unitmsat· requirednetFeeMsat· string · unitmsat· requiredshareQ9· string · unitq9· requiredrewardMsat· string · unitmsat· requiredstatus· enum(accrued,claimed,forfeited) · requiredepochDay· string · unitms· requiredcode· string | null · required
nextBeforeSeq· string | null · unitseq· required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"earnings": [
{
"seq": "100000",
"fillSeq": "100000",
"tsMs": "100000",
"ref": "string",
"grossFeeMsat": "100000",
"netFeeMsat": "100000",
"shareQ9": "100000",
"rewardMsat": "100000",
"status": "accrued",
"epochDay": "100000",
"code": "string"
}
],
"nextBeforeSeq": "100000"
}GET /v1/referral/referees
The account's referees.
Auth: API key (x-api-key)
Parameters
limit(query) — stringbeforeSeq(query) — string
Responses
- 200 — OK
referees· string · unitint· requirednextBeforeSeq· string | null · unitseq· required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"referees": "100000",
"nextBeforeSeq": "100000"
}POST /v1/referral/claim
Claim vested referral rewards.
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Responses
- 201 — Created
claimedMsat· string · unitmsat· requiredaccruals· string · unitint· required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 201 response:
json
{
"claimedMsat": "100000",
"accruals": "100000"
}Promoter
POST /v1/promoter/apply
Apply for a promoter profile.
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Request body
displayName· string · requiredchannels· object[] · requiredkind· string · requiredurl· string · requiredaudience· string · required
plan· string · requiredjurisdictions· string[] · requiredacceptedTermsVersion· string · required
json
{
"displayName": "string",
"channels": [
{
"kind": "string",
"url": "string",
"audience": "string"
}
],
"plan": "string",
"jurisdictions": [
"string"
],
"acceptedTermsVersion": "string"
}Responses
- 201 — Created
promoterId· string · requiredstatus· string · required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 201 response:
json
{
"promoterId": "string",
"status": "string"
}GET /v1/promoter
Promoter profile + status.
Auth: API key (x-api-key)
Responses
- 200 — OK
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 404 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
GET /v1/promoter/codes
The promoter's codes.
Auth: API key (x-api-key)
Responses
- 200 — OK
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
POST /v1/promoter/codes
Create a promoter code.
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Request body
code· string · requiredlabel· string · requiredkickbackQ9· string · unitq9· required
json
{
"code": "string",
"label": "string",
"kickbackQ9": "100000"
}Responses
- 201 — Created
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
GET /v1/promoter/stats
Promoter stats (days window).
Auth: API key (x-api-key)
Parameters
days(query) — string
Responses
- 200 — OK
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
GET /v1/promoter/earnings
Promoter earnings (cursor-paginated).
Auth: API key (x-api-key)
Parameters
limit(query) — stringbeforeSeq(query) — string
Responses
- 200 — OK
earnings· object[] · requiredseq· string · unitseq· requiredfillSeq· string | null · unitseq· requiredtsMs· string · unitms· requiredref· string | null · requiredgrossFeeMsat· string · unitmsat· requirednetFeeMsat· string · unitmsat· requiredshareQ9· string · unitq9· requiredrewardMsat· string · unitmsat· requiredstatus· enum(accrued,claimed,forfeited) · requiredepochDay· string · unitms· requiredcode· string | null · required
nextBeforeSeq· string | null · unitseq· required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"earnings": [
{
"seq": "100000",
"fillSeq": "100000",
"tsMs": "100000",
"ref": "string",
"grossFeeMsat": "100000",
"netFeeMsat": "100000",
"shareQ9": "100000",
"rewardMsat": "100000",
"status": "accrued",
"epochDay": "100000",
"code": "string"
}
],
"nextBeforeSeq": "100000"
}POST /v1/promoter/claim
Claim vested promoter rewards.
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Responses
- 201 — Created
claimedMsat· string · unitmsat· requiredaccruals· string · unitint· required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 201 response:
json
{
"claimedMsat": "100000",
"accruals": "100000"
}Onboarding
POST /v1/signup
Self-serve session (testnet profile only).
Auth: none (public)
Parameters
idempotency-key(header), required — string
Responses
- 201 — Created
apiKey· string · requiredaccountId· string · requiredrailAddress· string · requiredreferredBy· object · optionalcode· string · requiredboundTsMs· string · unitms· required
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 409 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
Example 201 response:
json
{
"apiKey": "string",
"accountId": "string",
"railAddress": "string",
"referredBy": {
"code": "string",
"boundTsMs": "100000"
}
}POST /v1/faucet
Testnet faucet grant (rate-limited).
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Responses
- 201 — Created
creditedMsat· string · unitmsat· requiredgrantsRemainingThisHour· integer · required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 201 response:
json
{
"creditedMsat": "100000",
"grantsRemainingThisHour": 0
}Leaderboard
GET /v1/leaderboard
A leaderboard board (?board=pnl|roi&window=7d|30d|all&limit=). Bounded.
Auth: none (public)
Parameters
board(query) — enum(pnl,roi)window(query) — enum(7d,30d,all)limit(query) — string
Responses
- 200 — OK
board· enum(pnl,roi) · requiredwindow· enum(7d,30d,all) · requiredrows· object[] · requiredrank· string · unitint· requiredhandle· string · requireddisplayName· string | null · requiredpnlMsat· string · unitmsat· requiredroiQ9· string · unitq9· requiredvolumeContracts· string · unitcontracts· requiredtrades· string · unitint· requiredwinRateQ9· string | null · unitq9· requiredmaxDrawdownQ9· string · unitq9· required
computedTsMs· string | null · unitms· requiredcadenceMinutes· string · unitint· requiredgates· object · requiredminEquityMsat· string · unitmsat· requiredminTrades· string · unitint· requiredminVolumeContracts· string · unitcontracts· required
windows· enum(7d,30d,all)[] · optionaltestnet· boolean · required
Example 200 response:
json
{
"board": "pnl",
"window": "7d",
"rows": [
{
"rank": "100000",
"handle": "string",
"displayName": "string",
"pnlMsat": "100000",
"roiQ9": "100000",
"volumeContracts": "100000",
"trades": "100000",
"winRateQ9": "100000",
"maxDrawdownQ9": "100000"
}
],
"computedTsMs": "100000",
"cadenceMinutes": "100000",
"gates": {
"minEquityMsat": "100000",
"minTrades": "100000",
"minVolumeContracts": "100000"
},
"windows": [
"7d"
],
"testnet": true
}GET /v1/leaderboard/me
The caller's own placements + per-window eligibility checklist.
Auth: API key (x-api-key)
Responses
- 200 — OK
optedOut· boolean · requiredhandle· string | null · requireddisplayName· string | null · requiredplacements· object[] · requiredboard· enum(pnl,roi) · requiredwindow· enum(7d,30d,all) · requiredrank· string · unitint· requiredpnlMsat· string · unitmsat· requiredroiQ9· string · unitq9· requiredvolumeContracts· string · unitcontracts· requiredtrades· string · unitint· requiredwinRateQ9· string | null · unitq9· requiredmaxDrawdownQ9· string · unitq9· required
eligibility· object[] · requiredwindow· enum(7d,30d,all) · requiredeligible· boolean · requiredreason· enum(gates_failed,insufficient_history,coverage_gap,window_unserved) | null · optionaleligibleAtMs· string | null · unitms· optionalchecks· object[] · required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"optedOut": true,
"handle": "string",
"displayName": "string",
"placements": [
{
"board": "pnl",
"window": "7d",
"rank": "100000",
"pnlMsat": "100000",
"roiQ9": "100000",
"volumeContracts": "100000",
"trades": "100000",
"winRateQ9": "100000",
"maxDrawdownQ9": "100000"
}
],
"eligibility": [
{
"window": "7d",
"eligible": true,
"reason": "gates_failed",
"eligibleAtMs": "100000",
"checks": [
{
"gate": "string",
"ok": true,
"thresholdMsat": "100000",
"threshold": "100000",
"valueMsat": "100000",
"value": "100000"
}
]
}
]
}GET /v1/leaderboard/trader/{handle}
A public trader profile (404 for opted-out OR unknown, indistinguishably).
Auth: none (public)
Parameters
handle(path), required — string
Responses
- 200 — OK
handle· string · requireddisplayName· string | null · requiredtradingSince· string | null · requiredplacements· object[] · requiredboard· enum(pnl,roi) · requiredwindow· enum(7d,30d,all) · requiredrank· string · unitint· requiredpnlMsat· string · unitmsat· requiredroiQ9· string · unitq9· requiredvolumeContracts· string · unitcontracts· requiredtrades· string · unitint· requiredwinRateQ9· string | null · unitq9· requiredmaxDrawdownQ9· string · unitq9· required
equityCurve· object[] · requireddayTsMs· string · unitms· requiredindexQ9· string · unitq9· required
testnet· boolean · required
Example 200 response:
json
{
"handle": "string",
"displayName": "string",
"tradingSince": "string",
"placements": [
{
"board": "pnl",
"window": "7d",
"rank": "100000",
"pnlMsat": "100000",
"roiQ9": "100000",
"volumeContracts": "100000",
"trades": "100000",
"winRateQ9": "100000",
"maxDrawdownQ9": "100000"
}
],
"equityCurve": [
{
"dayTsMs": "100000",
"indexQ9": "100000"
}
],
"testnet": true
}GET /v1/leaderboard/trader/{handle}/og.png
Server-rendered 1200×630 Open Graph share card (PNG) for a profile, from the same quantized cache (ETag on the recompute stamp; 404 for opted-out OR unknown, indistinguishably).
Auth: none (public)
Parameters
handle(path), required — string
Responses
- 200 — OK
POST /v1/leaderboard/settings
Opt-out/in + display-name claim (own public identity).
Auth: API key (x-api-key)
Parameters
idempotency-key(header), required — string
Request body
optedOut· boolean · optionaldisplayName· string | null · optional
json
{
"optedOut": true,
"displayName": "string"
}Responses
- 200 — OK
optedOut· boolean · requiredhandle· string | null · requireddisplayName· string | null · requiredplacements· object[] · requiredboard· enum(pnl,roi) · requiredwindow· enum(7d,30d,all) · requiredrank· string · unitint· requiredpnlMsat· string · unitmsat· requiredroiQ9· string · unitq9· requiredvolumeContracts· string · unitcontracts· requiredtrades· string · unitint· requiredwinRateQ9· string | null · unitq9· requiredmaxDrawdownQ9· string · unitq9· required
eligibility· object[] · requiredwindow· enum(7d,30d,all) · requiredeligible· boolean · requiredreason· enum(gates_failed,insufficient_history,coverage_gap,window_unserved) | null · optionaleligibleAtMs· string | null · unitms· optionalchecks· object[] · required
- 401 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 403 — Refusal — a stable machine
code(ErrorCode) beside humanerrorprose.error· string · requiredcode·ErrorCode· optional
- 429 — 429 — a token bucket is exhausted.
error· string · requiredcode·ErrorCode· optional
Example 200 response:
json
{
"optedOut": true,
"handle": "string",
"displayName": "string",
"placements": [
{
"board": "pnl",
"window": "7d",
"rank": "100000",
"pnlMsat": "100000",
"roiQ9": "100000",
"volumeContracts": "100000",
"trades": "100000",
"winRateQ9": "100000",
"maxDrawdownQ9": "100000"
}
],
"eligibility": [
{
"window": "7d",
"eligible": true,
"reason": "gates_failed",
"eligibleAtMs": "100000",
"checks": [
{
"gate": "string",
"ok": true,
"thresholdMsat": "100000",
"threshold": "100000",
"valueMsat": "100000",
"value": "100000"
}
]
}
]
}Schemas
Types referenced by the fields above.
ErrorCode
Enum — one of: validation, unauthorized, insufficient_scope, compliance_refused, session_limit, referral_forbidden, not_found, idempotency_key_reused, conflict, confirmation_required, rate_limited, feature_unavailable, deposits_halted, unavailable, insufficient_balance, insufficient_margin, position_limit, oi_cap, reduce_only, market_halted, oracle_stale, body_too_large
FundingHistoryEntry
tsMs· string · unitms· requiredrateQ9· string · unitq9· requiredskewQ9· string · unitq9· required
OrdersPage
orders· object[] · requiredorderId· string · requiredmarketId· string · requiredside· enum(buy,sell) · requiredtype· enum(market,limit,stop_market,take_profit_market) · requiredcontracts· string · unitcontracts· requiredstatus· enum(accepted,filled,canceled,rejected) · requiredreason· string | null · required
nextBeforeSeq· string | null · unitseq· required
Position
marketId· string · requiredside· enum(long,short) · requiredcontracts· string · unitcontracts· requiredentryPriceQ8· string · unitq8· requiredmarginMsat· string · unitmsat· requiredfundingClockTsMs· string · unitms· required
PublicMarket
marketId· string · requiredunderlying· string · requiredcontractType· enum(inverse,quanto) · requiredoracleFeedId· string · requiredquantoMultiplierMsat· string | null · unitmsat· requiredstatus· enum(live,reduce_only,halted) · requiredtickSizeQ8· string · unitq8· requiredpriceDp· string · unitint· requiredminOrderContracts· string · unitcontracts· requiredmaxOrderContracts· string · unitcontracts· requiredtakerFeeQ9· string · unitq9· requiredmaxLeverage· string · unitint· requiredimRateQ9· string · unitq9· requiredmmRateQ9· string · unitq9· requiredbaseSpreadQ9· string · unitq9· requiredfundingRateHourlyQ9· string · unitq9· requirednextFundingTsMs· string · unitms· requiredoracleStalenessMs· string · unitms· requiredopenInterestContracts· string · unitcontracts· requiredskewQ9· string · unitq9· requiredlastPrice· object | null · required
TriggersPage
triggers· object[] · requiredorderId· string · requiredmarketId· string · requiredkind· enum(entry,stop,take_profit) · requiredside· enum(buy,sell) · requiredcontracts· string · unitcontracts· requiredtriggerPriceQ8· string · unitq8· requiredreduceOnly· boolean · requiredstatus· enum(resting,armed,blocked,executed,cancelled) · requiredreason· string | null · requiredocoGroup· string | null · required
nextBeforeSeq· string | null · unitseq· required