Schemas#
Request and response objects of the Anboto Trading API. Endpoint pages link here from their type columns.
AccountMarginResponse#
Margin and equity summary of a futures account on one exchange. Account value is equity: it already includes unrealised PnL, so a portfolio total adds spot holdings to equity and must not add unrealized_pnl again. position_value is exposure, not money. Fields the exchange does not report are absent rather than zero. remaining_cushion, liq_distance and vol_cover measure margin the same way on every exchange; they are absent for Binance portfolio-margin and Kraken accounts, and when price history is missing. raw_margin_ratio is the exchange's own account ratio; its convention differs between exchanges.
| Field | Type | Description | Example | |
|---|---|---|---|---|
equity |
number | Account equity: wallet balance plus unrealised PnL | ||
balance |
number | Wallet balance, excluding unrealised PnL | ||
unrealized_pnl |
number | Unrealised PnL across open positions | ||
position_value |
number | Total notional of open positions (exposure, not account value) | ||
total_initial_margin |
number | Initial margin locked by open positions | ||
total_maint_margin |
number | Maintenance margin requirement | ||
total_order_margin |
number | Margin locked by open orders, where the exchange reports it separately | ||
margin_ratio |
number | Maintenance margin over equity, normalised to 0..1 (liquidation approached at 1) | ||
raw_margin_ratio |
number | Venue-native account margin ratio as sent (conventions differ). Omitted when the venue has no native account ratio. | ||
raw_margin_field |
string | Venue JSON key for raw_margin_ratio, e.g. uniMMR, mgnRatio, accountMMRate. | ||
remaining_cushion |
number | 1 minus margin_ratio. Negative once equity is already below maintenance margin. | ||
liq_distance |
number | (equity − maintenance margin) / notional. Absent for Binance portfolio-margin and Kraken accounts. | ||
vol_cover |
number | Pessimistic volatility cover: (equity − maintenance margin) / Σ(|notional| × σ). Absent for Binance portfolio-margin and Kraken accounts, with no open positions, or when price history is missing. | ||
vol_sigma_window |
string | Label for the σ window used in vol_cover, e.g. 24h | ||
margin_estimated |
boolean | True when maintenance margin was estimated (Lighter) rather than reported by the venue | ||
effective_leverage |
number | Position value over equity | ||
available_balance |
number | Balance available to open new positions | ||
account_mode |
string | Exchange account mode, where reported (for example cross or isolated) |
AccountPositionResponse#
One open position of an account on an exchange
| Field | Type | Description | Example | |
|---|---|---|---|---|
collateral |
number | The collateral amount for the position | ||
contracts |
number | The number of contracts | ||
entryPrice |
number | The average entry price | ||
leverage |
number | The position leverage | ||
liquidationPrice |
number | The liquidation price | ||
marginMode |
enum | The margin mode of the position — CROSS, ISOLATED |
||
markPrice |
number | The current mark price | ||
notional |
number | The notional value of the position | ||
side |
enum | The position side — LONG, SHORT, BOTH |
||
symbol |
string | The trading symbol | ||
timestamp |
integer | Unix timestamp in milliseconds | ||
unrealizedPnl |
number | The unrealized profit and loss |
ApiErrorCode#
The error code used to describe why an order was rejected.
Values: OTHER, QUANTITY_EXCEED, AUTHENTICATION_ERROR, INSUFFICIENT_FUNDS, RATE_LIMIT_EXCEEDED, DDOS_PROTECTION, EXCHANGE_NOT_AVAILABLE, NETWORK_ERROR, INVALID_ORDER, EXCHANGE_ERROR, EMS_INSTANCES_DOWN, SLIPPAGE_EXCEEDED, EXPIRY_REACHED, MAX_FEE_PER_GAS_IS_TOO_LOW, PARENT_ORDER_WAS_TERMINATED, MAX_PRIORITY_FEE_PER_GAS_IS_TOO_LOW, INVALID_QUANTITY, INVALID_END_TIME, INVALID_TRADE_TIME, INVALID_FEE, INVALID_SYMBOL, INVALID_TRADE_STRATEGY, INVALID_LIMIT_PRICE, INVALID_WOULD_PRICE, INVALID_TRIGGER_PRICE, INVALID_PARAM, INVALID_EXCHANGE, INVALID_SIGNATURE, INVALID_API_KEY, INVALID_TIMESTAMP, BATCH_OVERSIZE, SYSTEM_ERROR, INVALID_REQUEST, SYSTEM_BUSY
AssetBalanceResponse#
Balance of one asset in an account on an exchange
| Field | Type | Description | Example | |
|---|---|---|---|---|
balance |
number | The total balance of the asset | ||
free |
number | The balance available for trading | ||
symbol |
string | The asset symbol | BTC |
AssetCategory#
The Asset category of the order.
Values: SPOT, FUTURE
AssetClass#
Values: UNDEFINED, SPOT, FUTURE, OPTION, CFD
CancelManyUpstreamOrdersRequest#
Used for cancelling many parent orders at the same time
| Field | Type | Description | Example | |
|---|---|---|---|---|
orders |
array[CancelUpstreamOrderRequest] | required | The list of parent cancellation requests | |
orders[].order_id |
integer | The Anboto generated order id | 123456 |
|
orders[].client_order_id |
string | The client provided order id | xxx-yyy-zzzz |
CancelUpstreamOrderRequest#
Used for cancelling a parent order
| Field | Type | Description | Example | |
|---|---|---|---|---|
order_id |
integer | The Anboto generated order id | 123456 |
|
client_order_id |
string | The client provided order id | xxx-yyy-zzzz |
ClipSizeType#
The clip size for the child orders. The default is AUTOMATIC
Values: ABSOLUTE, PERCENTAGE, AUTOMATIC, ORDER_COUNT
CreateManyMultiLegsParentOrdersRequest#
A request to create many multilegs orders in a single request.
| Field | Type | Description | Example | |
|---|---|---|---|---|
orders |
array[CreateMultiLegsParentOrderRequest] | required | ||
orders[].client_order_id |
string | A custom string to identify the order | ABC-12345^12-10-23 |
|
orders[].subaccount |
string | The sub-account under which to trade the order | ||
orders[].algo |
enum | required | The execution strategy for the order. — PAIR |
|
orders[].legs |
array[CreateOrderLegRequest] | required | The order legs | |
orders[].start_time |
string | The start time in UTC | 2024-01-22T22:05:00Z |
|
orders[].end_time |
string | The end time in UTC | 2024-04-22T22:05:00Z |
|
orders[].params |
MultiLegsOrderParams | The advanced order parameters to modify the execution behavior. |
CreateManyParentOrdersRequest#
A request to create many parent orders in a single request.
| Field | Type | Description | Example | |
|---|---|---|---|---|
orders |
array[CreateParentOrderRequest] | required | ||
orders[].client_order_id |
string | A custom string to identify the order | ABC-12345^12-10-23 |
|
orders[].exchange |
enum | required | The exchanges available for order placement via the API — BINANCE, HUOBI, GATEIO, KRAKEN, KUCOIN, OKX, BYBIT, BITGET, … (17 values) |
|
orders[].subaccount |
string | The sub-account under which to trade the order | ||
orders[].symbol |
string | required | The symbol using Anboto symbology, e.g. BTC/USDT | |
orders[].asset_category |
enum | required | The Asset category of the order. — SPOT, FUTURE |
SPOT |
orders[].side |
enum | required | The side of the book to trade. — BUY, SELL |
|
orders[].quantity |
string | required | The quantity to trade as a exchange trade-able decimal value, e.g. 0.015 | |
orders[].strategy |
enum | required | The execution strategy for the order. — TWAP, VWAP, ICEBERG, POV, MARKET, LIMIT, IS, SCALE |
|
orders[].limit_price |
string | The exchange valid limit price for the order | 2205.10 |
|
orders[].limit_is_arrival |
boolean | Use the arrival price (the midpoint when Anboto accepts the order) as the limit price; params.limit_bps shifts it. Mutually exclusive with limit_price. | ||
orders[].start_time |
string | The start time in UTC | 2024-01-22T22:05:00Z |
|
orders[].end_time |
string | The end time in UTC | 2024-04-22T22:05:00Z |
|
orders[].clip_size_type |
enum | The clip size for the child orders. The default is AUTOMATIC — ABSOLUTE, PERCENTAGE, AUTOMATIC, ORDER_COUNT |
AUTOMATIC |
|
orders[].clip_size_val |
string | The clip size value, required if the type is ABSOLUTE or PERCENTAGE | 0.01 |
|
orders[].params |
OrderParams | The advanced order parameters to modify the execution behavior. |
CreateMultiLegsParentOrderRequest#
Used for creating a parent order.
| Field | Type | Description | Example | |
|---|---|---|---|---|
client_order_id |
string | A custom string to identify the order | ABC-12345^12-10-23 |
|
subaccount |
string | The sub-account under which to trade the order | ||
algo |
enum | required | The execution strategy for the order. — PAIR |
|
legs |
array[CreateOrderLegRequest] | required | The order legs | |
legs[].exchange |
enum | required | The exchanges available for order placement via the API — BINANCE, HUOBI, GATEIO, KRAKEN, KUCOIN, OKX, BYBIT, BITGET, … (17 values) |
|
legs[].symbol |
string | required | The symbol using Anboto symbology, e.g. BTC/USDT | |
legs[].asset_category |
enum | required | The Asset category of the order. — SPOT, FUTURE |
SPOT |
legs[].side |
enum | required | The side of the book to trade. — BUY, SELL |
|
legs[].target_value |
string | required | The target value to be filled | 12.0 |
legs[].ccy |
string | required | The currency of target value | USD |
legs[].limit_price |
string | The exchange valid limit price for the order leg | 2205.10 |
|
legs[].strategy |
enum | required | The execution strategy for the order. — TWAP, VWAP, ICEBERG, POV, MARKET, LIMIT, IS, SCALE |
|
legs[].clip_size_type |
enum | The clip size for the child orders. The default is AUTOMATIC — ABSOLUTE, PERCENTAGE, AUTOMATIC, ORDER_COUNT |
AUTOMATIC |
|
legs[].clip_size_val |
string | The clip size value, required if the type is ABSOLUTE or PERCENTAGE | 0.01 |
|
legs[].params |
OrderLegParams | The advanced order parameters to modify the execution behavior. | ||
start_time |
string | The start time in UTC | 2024-01-22T22:05:00Z |
|
end_time |
string | The end time in UTC | 2024-04-22T22:05:00Z |
|
params |
MultiLegsOrderParams | The advanced order parameters to modify the execution behavior. |
CreateOrderLegRequest#
Used for creating a parent order.
| Field | Type | Description | Example | |
|---|---|---|---|---|
exchange |
enum | required | The exchanges available for order placement via the API — BINANCE, HUOBI, GATEIO, KRAKEN, KUCOIN, OKX, BYBIT, BITGET, … (17 values) |
|
symbol |
string | required | The symbol using Anboto symbology, e.g. BTC/USDT | |
asset_category |
enum | required | The Asset category of the order. — SPOT, FUTURE |
SPOT |
side |
enum | required | The side of the book to trade. — BUY, SELL |
|
target_value |
string | required | The target value to be filled | 12.0 |
ccy |
string | required | The currency of target value | USD |
limit_price |
string | The exchange valid limit price for the order leg | 2205.10 |
|
strategy |
enum | required | The execution strategy for the order. — TWAP, VWAP, ICEBERG, POV, MARKET, LIMIT, IS, SCALE |
|
clip_size_type |
enum | The clip size for the child orders. The default is AUTOMATIC — ABSOLUTE, PERCENTAGE, AUTOMATIC, ORDER_COUNT |
AUTOMATIC |
|
clip_size_val |
string | The clip size value, required if the type is ABSOLUTE or PERCENTAGE | 0.01 |
|
params |
OrderLegParams | The advanced order parameters to modify the execution behavior. | ||
params.duration_seconds |
string | The duration of the order in seconds, this is a required field for TWAP and VWAP. | 120 |
|
params.trading_style |
enum | The trading style of the order, the default is HYBRID — PASSIVE, AGGRESSIVE, HYBRID |
||
params.urgency |
enum | The Urgency or Risk Aversion of the IS strategy, the default is MEDIUM. The parameter is not case-sensitive. Each risk aversion levels correspond to a lambda value, "that is, how much we penalize variance relative to expected cost" Low : 0.2e-6 Medium: 1e-6 High: 5e-6 Based on the paper from Almgren Chriss https://www.smallake.kr/wp-content/uploads/2016/03/optliq.pdf — LOW, MEDIUM, HIGH |
||
params.randomize_amount |
boolean | Whether to randomize the slice amount | ||
params.would |
WouldInfo | Information to instruct how to execute a Would price trigger. | ||
params.trigger |
TriggerInfo | Information related to how the order should be triggered. | ||
params.placement_infos |
PlacementInfo | How to place an order into the book | ||
params.is_leading |
boolean | true if this is a leading leg | ||
params.timer_iceberg_delay |
number | Seconds between Iceberg and Scale clips, between 0.25 and 3600. Omitted: the engine uses 0.25 | 0.5 |
|
params.timer_iceberg_delay_min |
number | Lower bound, in seconds, of the Iceberg/Scale clip delay. May be 0. Set together with timer_iceberg_delay_max | 0 |
|
params.timer_iceberg_delay_max |
number | Upper bound, in seconds, of the Iceberg/Scale clip delay, up to 3600. Set together with timer_iceberg_delay_min | 10 |
|
params.randomize_iceberg_timer |
boolean | Randomize the Iceberg/Scale clip delay between 80% and 120% of timer_iceberg_delay. A min/max band replaces that draw when both bounds are set. Omitted: the engine uses true. Explicit false cannot be combined with the band | ||
params.extend_duration |
boolean | TWAP, VWAP, and IS: extend the scheduled end past duration_seconds by a buffer, still capped by end_time. Omitted: the engine uses true |
CreateParentOrderRequest#
Used for creating a parent order.
| Field | Type | Description | Example | |
|---|---|---|---|---|
client_order_id |
string | A custom string to identify the order | ABC-12345^12-10-23 |
|
exchange |
enum | required | The exchanges available for order placement via the API — BINANCE, HUOBI, GATEIO, KRAKEN, KUCOIN, OKX, BYBIT, BITGET, … (17 values) |
|
subaccount |
string | The sub-account under which to trade the order | ||
symbol |
string | required | The symbol using Anboto symbology, e.g. BTC/USDT | |
asset_category |
enum | required | The Asset category of the order. — SPOT, FUTURE |
SPOT |
side |
enum | required | The side of the book to trade. — BUY, SELL |
|
quantity |
string | required | The quantity to trade as a exchange trade-able decimal value, e.g. 0.015 | |
strategy |
enum | required | The execution strategy for the order. — TWAP, VWAP, ICEBERG, POV, MARKET, LIMIT, IS, SCALE |
|
limit_price |
string | The exchange valid limit price for the order | 2205.10 |
|
limit_is_arrival |
boolean | Use the arrival price (the midpoint when Anboto accepts the order) as the limit price; params.limit_bps shifts it. Mutually exclusive with limit_price. | ||
start_time |
string | The start time in UTC | 2024-01-22T22:05:00Z |
|
end_time |
string | The end time in UTC | 2024-04-22T22:05:00Z |
|
clip_size_type |
enum | The clip size for the child orders. The default is AUTOMATIC — ABSOLUTE, PERCENTAGE, AUTOMATIC, ORDER_COUNT |
AUTOMATIC |
|
clip_size_val |
string | The clip size value, required if the type is ABSOLUTE or PERCENTAGE | 0.01 |
|
params |
OrderParams | The advanced order parameters to modify the execution behavior. | ||
params.duration_seconds |
string | The duration of the order in seconds, this is a required field for TWAP and VWAP. | 120 |
|
params.trading_style |
enum | The trading style of the order, the default is HYBRID — PASSIVE, AGGRESSIVE, HYBRID |
||
params.urgency |
enum | The Urgency or Risk Aversion of the IS strategy, the default is MEDIUM. The parameter is not case-sensitive. Each risk aversion levels correspond to a lambda value, "that is, how much we penalize variance relative to expected cost" Low : 0.2e-6 Medium: 1e-6 High: 5e-6 Based on the paper from Almgren Chriss https://www.smallake.kr/wp-content/uploads/2016/03/optliq.pdf — LOW, MEDIUM, HIGH |
||
params.pov_ratio |
number | Target participation in market volume, in percent (e.g. 5 = 5 %). Required for POV, between 0.01 and 33 | 5 |
|
params.pov_risk |
enum | How far the POV strategy may fall behind its target before it sends the next child order: LOW 2 %, DEFAULT 7.5 %, HIGH 15 % of the executed quantity. The parameter is not case-sensitive. — LOW, DEFAULT, HIGH |
||
params.randomize_amount |
boolean | Whether to randomize the slice amount | ||
params.would |
WouldInfo | Information to instruct how to execute a Would price trigger. | ||
params.trigger |
TriggerInfo | Information related to how the order should be triggered. | ||
params.placement_infos |
PlacementInfo | How to place an order into the book | ||
params.reduce_only |
boolean | Reduce Only for future positions | ||
params.start_ladder_price |
string | Start price for Scale (ICEBERG) ladder | ||
params.end_ladder_price |
string | End price for Scale (ICEBERG) ladder | ||
params.ladder_direction |
string | Scale ladder direction: upwards or downwards | ||
params.ladder_profile |
string | Scale ladder profile. Default: linear | ||
params.size_skew |
number | Scale size skew (1 = linear). Default: 1 | ||
params.ob_imbalance_cancel |
boolean | Cancel resting child orders and pause re-posting while the orderbook L1 imbalance leans against the order | ||
params.ob_imbalance_threshold |
string | Opposing-side share of L1 quantity that triggers the imbalance cancel, between 0.5 and 0.99. Default: 0.75. Only used with ob_imbalance_cancel | 0.75 |
|
params.price_lock_bps |
string | Opportunistic completion: take the full remainder aggressively when the market is this many bps better than the arrival price, between 1 and 100 | 5 |
|
params.limit_is_arrival |
boolean | Use the arrival price (the midpoint when Anboto accepts the order) as the limit price; limit_bps shifts it. Mutually exclusive with top-level limit_price. | ||
params.limit_bps |
string | Signed bps vs the parent cap (arrival or numeric limit_price). Positive = must be better; negative = may be worse. Range -100 to 100. Omitted or 0 leaves the cap unchanged. | -10 |
|
params.timer_iceberg_delay |
number | Seconds between Iceberg and Scale clips, between 0.25 and 3600. Omitted: the engine uses 0.25 | 0.5 |
|
params.timer_iceberg_delay_min |
number | Lower bound, in seconds, of the Iceberg/Scale clip delay. May be 0. Set together with timer_iceberg_delay_max. When both are set, the engine draws once from this band instead of 80–120% of timer_iceberg_delay | 0 |
|
params.timer_iceberg_delay_max |
number | Upper bound, in seconds, of the Iceberg/Scale clip delay, up to 3600. Set together with timer_iceberg_delay_min | 10 |
|
params.randomize_iceberg_timer |
boolean | Randomize the Iceberg/Scale clip delay between 80% and 120% of timer_iceberg_delay. A min/max band replaces that draw when both bounds are set. Omitted: the engine uses true. Explicit false cannot be combined with the band | ||
params.extend_duration |
boolean | TWAP, VWAP, and IS: extend the scheduled end past duration_seconds by a buffer, still capped by end_time. Omitted: the engine uses true |
CreateStrategyCampaignRequest#
Start a PAPER-farm campaign
| Field | Type | Description | Example | |
|---|---|---|---|---|
type |
string | required | Campaign type; today only paper_farm | |
exchange_id |
string | required | The venue to farm on; today only papertrade | |
symbol |
string | required | Anboto symbol, BTC/USDC:USDC or ETH/USDC:USDC | BTC/USDC:USDC |
leverage |
integer | required | Leverage of each leg, 1-1000 (the leverage guard caps it well below 1000 in practice) | |
margin_per_leg |
number | required | Margin to post per leg at the start of a cycle, in USDC (>= 10) | |
target_move_bps |
integer | required | Winning-leg move, in basis points, that closes a cycle (50-100) | |
max_cycles |
integer | Stop after this many cycles; omit or null for unlimited | ||
budget_usdc |
number | Stop once this much USDC has been spent; omit or null for no cap | ||
stop |
StrategyStopRules | Stop conditions the campaign watches on its own, besides an explicit stop/kill | ||
stop.queued_share_pct |
number | Stop once this percent (0-100) of a new cycle's margin would come from queued profit rather than fresh budget. Null or omitted: off | ||
stop.stop_before_key_expiry |
boolean | Stop gracefully once the Papertrade session key has under an hour left, rather than risk a cycle stuck open past expiry | ||
stop.hard_kill_on_stop |
boolean | If a stop rule fires mid-cycle, close both legs at market now instead of waiting for the target |
DepthMode#
How placement and cancel are measured. LEVEL walks the book. BPS_SPREAD is basis points from the midpoint. Omitted means LEVEL.
Values: LEVEL, BPS_SPREAD
ExchangeCode#
Platform exchange identifier (all venues, including ones not tradable via the API)
Values: BINANCE, HUOBI, COINBASE_ADV, GATEIO, KRAKEN, KUCOIN, OKX, BYBIT, WOO, MEXC, BITGET, BULLISH, B2C2, HYPERLIQUID, COINBASE_PRIME, COINBASE_INTL, EXTENDED, LIGHTER, PAPERTRADE
ExecutionStrategy#
The execution strategy for the order.
Values: TWAP, VWAP, ICEBERG, POV, MARKET, LIMIT, IS, SCALE
FlowRecord#
One deposit, withdrawal or internal transfer leg
| Field | Type | Description | Example | |
|---|---|---|---|---|
id |
string | required | Stable identifier of the flow | |
time |
integer | required | Event time, ms since epoch | |
exchange |
string | required | ||
subaccount |
string | required | "" is the main account | |
type |
enum | required | deposit, withdrawal, internal_transfer |
|
direction |
enum | required | Direction for this account — in, out, internal, unknown |
|
external |
boolean | required | True for flows that cross the team's boundary (deposits and withdrawals) | |
asset |
string | required | ||
qty |
number | required | Absolute amount of the asset, with every stored decimal digit | |
usd_value |
number | required | USD value at the event time; null when the asset could not be priced | |
net_flow_usd |
number | required | Signed contribution to the total-scope net_flows of the daily PnL (positive in, negative out). 0 for transfers within one account (whatever the price) and for unknown directions. null when the asset could not be priced: the flow is then not in the USD totals and is counted in totals.unpriced_count. counted_in_pnl is false whenever net_flow_usd is 0 for those reasons or null | |
counted_in_pnl |
boolean | required | Whether the flow moves net_flows of the daily PnL: true when net_flow_usd is not null and direction is in or out | |
source |
string | required | Exchange history the flow was read from, e.g. binance_deposit, binance_sub_transfer |
FlowTotals#
Sums of net_flow_usd over the whole window and selection
| Field | Type | Description | Example | |
|---|---|---|---|---|
deposits_usd |
number | required | Sum of deposits (≥ 0) | |
withdrawals_usd |
number | required | Sum of withdrawals, signed (≤ 0) | |
net_external_usd |
number | required | deposits_usd + withdrawals_usd | |
net_internal_usd |
number | required | Net of internal transfers counted in PnL (non-zero when the selection is part of the team) | |
unpriced_count |
integer | required | Flows whose net_flow_usd is null (unpriced); they are not in the USD sums |
FundingRate#
| Field | Type | Description | Example | |
|---|---|---|---|---|
exchange |
string | required | ||
symbol |
string | required | ||
time |
date-time | required | ||
nextTime |
date-time | required | ||
rate |
number | required | ||
nextRate |
number | |||
markPrice |
number |
Instrument#
| Field | Type | Description | Example | |
|---|---|---|---|---|
exchange |
enum | required | Platform exchange identifier (all venues, including ones not tradable via the API) — BINANCE, HUOBI, COINBASE_ADV, GATEIO, KRAKEN, KUCOIN, OKX, BYBIT, … (19 values) |
|
symbol |
string | required | ||
baseAsset |
string | required | ||
quoteAsset |
string | required | ||
exchangeSymbol |
string | required | ||
exchangeAssetClass |
string | required | ||
assetClass |
enum | required | UNDEFINED, SPOT, FUTURE, OPTION, CFD |
|
quantityPrecision |
integer | |||
pricePrecision |
integer | |||
maxQuantityLimit |
number | |||
minQuantityLimit |
number | |||
minCostLimit |
number | |||
maxCostLimit |
number | |||
contractSize |
number | |||
minMarketLimit |
number | |||
maxMarketLimit |
number | |||
minPriceLimit |
number | |||
maxPriceLimit |
number | |||
enabled |
boolean | required | ||
timestamp |
date-time | required | ||
priceSignificantFigure |
integer | |||
quantitySignificantFigure |
integer | |||
assetId |
string |
LedgerCoverage#
Income ingestion status of one account and market
| Field | Type | Description | Example | |
|---|---|---|---|---|
exchange |
string | required | ||
subaccount |
string | required | "" is the main account; null means every account on the exchange | |
market |
enum | required | spot, future |
|
status |
enum | required | complete, partial, unsupported |
|
ingested_through |
date-time | required | UTC time up to which income is ingested | |
reason |
string | required | Why the account is partial or unsupported, e.g. exchange_not_supported, key_invalid |
LedgerRow#
Income of one day and/or symbol of one account, in USD
| Field | Type | Description | Example | |
|---|---|---|---|---|
date |
date | required | UTC day (YYYY-MM-DD); null when group_by is symbol | |
exchange |
string | required | ||
subaccount |
string | required | "" is the main account | |
symbol |
string | required | Anboto symbol, e.g. BTC/USDT:USDT (futures) or BTC/USDT (spot); null when group_by is day or for income without a symbol | |
market |
enum | required | spot, future |
|
realized_pnl |
number | required | Realized trading PnL; null for market spot (trading fees only), never 0 | |
funding |
number | required | Funding; null for market spot (trading fees only), never 0 | |
commission |
number | required | Trading fees (≤ 0), spot and futures | |
fee_rebate |
number | required | Fee rebates (≥ 0), spot and futures | |
interest |
number | required | Margin interest: not ingested, 0 | |
other |
number | required | Other PnL-relevant income; null for market spot (trading fees only), never 0 | |
net |
number | required | Net realized (futures): sum of the row's components. Null for market spot: spot trading fees are in commission and fee_rebate only, never in net |
LedgerTotals#
Income components in USD. net is the net realized PnL of the futures scopes only: spot trading fees are in commission and fee_rebate but not in net. Every value is null when no day of the window is covered
| Field | Type | Description | Example | |
|---|---|---|---|---|
realized_pnl |
number | required | Realized trading PnL; null when the selection has no futures scope | |
funding |
number | required | Funding: positive when received; null when the selection has no futures scope | |
commission |
number | required | Trading fees (≤ 0) | |
fee_rebate |
number | required | Fee rebates (≥ 0) | |
interest |
number | required | Margin interest: not ingested, 0 | |
other |
number | required | Other PnL-relevant income; null when the selection has no futures scope | |
net |
number | required | Net realized (futures): the sum of the futures components. Spot trading fees are in commission and fee_rebate but not in net, so with a spot scope in the selection net is not the sum of the values above. Null when the selection has no futures scope |
MultiLegsAlgo#
The execution strategy for the order.
Values: PAIR
MultiLegsOrderParams#
The advanced order parameters to modify the execution behavior.
Type: object
OrderDetails#
| Field | Type | Description | Example | |
|---|---|---|---|---|
order_id |
integer | The Anboto generated order id | 123456 |
|
client_order_id |
string | The client provided order id | xxx-yyy-zzz |
|
symbol |
string | The order symbol in Anboto's symbology | ||
status |
enum | The order status — PENDING_NEW, ACCEPTED, REJECTED, PARTIALLY_FILLED, FILLED, PENDING_CANCEL, CANCELLED, PENDING_PAUSE, … (12 values) |
||
asset_class |
enum | The Asset category of the order. — SPOT, FUTURE |
SPOT |
|
exchange |
enum | The exchanges available for order placement via the API — BINANCE, HUOBI, GATEIO, KRAKEN, KUCOIN, OKX, BYBIT, BITGET, … (17 values) |
||
strategy |
enum | The execution strategy for the order. — TWAP, VWAP, ICEBERG, POV, MARKET, LIMIT, IS, SCALE |
VWAP |
|
start_time |
number | The time when the order start trading from epoch time in ms | ||
end_time |
number | The scheduled end of the execution from epoch time in ms while the order is working (e.g. start_time + duration for a TWAP); the time the order reached its terminal state once finished | ||
quantity |
number | The total quantity of the parent order in base asset, as placed. Absent for value-target (notional) orders, see target_value | 6 |
|
filled_quantity |
number | required | The absolute amount of the order quantity filled | 0 |
leaves_quantity |
number | required | The absolute amount of the parent order quantity remaining to be filled (quantity - filled_quantity, 0 once the order is terminal). This is the parent order's remainder, never the leaves of the child order currently working it | 0 |
progress |
number | Execution progress of the parent order between 0 and 1: filled_quantity / quantity, or filled notional / target_value for value-target orders. Same computation as the WebSocket order topic orderProgress; 1 once FILLED. Absent when the parent order is not known | 0.1783 |
|
side |
enum | The side of the book to trade. — BUY, SELL |
||
last_quantity |
number | required | The last qty received in a fill from the exchange | 0 |
last_price |
number | required | The last price executed on the exchange | 0 |
average_price |
number | required | The average execution price of the order | 0 |
limit_price |
number | The limit price of the parent order, if one was set | ||
clip_size_type |
enum | The clip size for the child orders. The default is AUTOMATIC — ABSOLUTE, PERCENTAGE, AUTOMATIC, ORDER_COUNT |
||
clip_size_val |
number | The clip size value of the parent order, as placed | ||
target_value |
number | The target notional of a value-target order (e.g. a multi-leg order leg); quantity is absent for such orders | ||
params |
OrderParams | The advanced order parameters to modify the execution behavior. | ||
params.duration_seconds |
string | The duration of the order in seconds, this is a required field for TWAP and VWAP. | 120 |
|
params.trading_style |
enum | The trading style of the order, the default is HYBRID — PASSIVE, AGGRESSIVE, HYBRID |
||
params.urgency |
enum | The Urgency or Risk Aversion of the IS strategy, the default is MEDIUM. The parameter is not case-sensitive. Each risk aversion levels correspond to a lambda value, "that is, how much we penalize variance relative to expected cost" Low : 0.2e-6 Medium: 1e-6 High: 5e-6 Based on the paper from Almgren Chriss https://www.smallake.kr/wp-content/uploads/2016/03/optliq.pdf — LOW, MEDIUM, HIGH |
||
params.pov_ratio |
number | Target participation in market volume, in percent (e.g. 5 = 5 %). Required for POV, between 0.01 and 33 | 5 |
|
params.pov_risk |
enum | How far the POV strategy may fall behind its target before it sends the next child order: LOW 2 %, DEFAULT 7.5 %, HIGH 15 % of the executed quantity. The parameter is not case-sensitive. — LOW, DEFAULT, HIGH |
||
params.randomize_amount |
boolean | Whether to randomize the slice amount | ||
params.would |
WouldInfo | Information to instruct how to execute a Would price trigger. | ||
params.trigger |
TriggerInfo | Information related to how the order should be triggered. | ||
params.placement_infos |
PlacementInfo | How to place an order into the book | ||
params.reduce_only |
boolean | Reduce Only for future positions | ||
params.start_ladder_price |
string | Start price for Scale (ICEBERG) ladder | ||
params.end_ladder_price |
string | End price for Scale (ICEBERG) ladder | ||
params.ladder_direction |
string | Scale ladder direction: upwards or downwards | ||
params.ladder_profile |
string | Scale ladder profile. Default: linear | ||
params.size_skew |
number | Scale size skew (1 = linear). Default: 1 | ||
params.ob_imbalance_cancel |
boolean | Cancel resting child orders and pause re-posting while the orderbook L1 imbalance leans against the order | ||
params.ob_imbalance_threshold |
string | Opposing-side share of L1 quantity that triggers the imbalance cancel, between 0.5 and 0.99. Default: 0.75. Only used with ob_imbalance_cancel | 0.75 |
|
params.price_lock_bps |
string | Opportunistic completion: take the full remainder aggressively when the market is this many bps better than the arrival price, between 1 and 100 | 5 |
|
params.limit_is_arrival |
boolean | Use the arrival price (the midpoint when Anboto accepts the order) as the limit price; limit_bps shifts it. Mutually exclusive with top-level limit_price. | ||
params.limit_bps |
string | Signed bps vs the parent cap (arrival or numeric limit_price). Positive = must be better; negative = may be worse. Range -100 to 100. Omitted or 0 leaves the cap unchanged. | -10 |
|
params.timer_iceberg_delay |
number | Seconds between Iceberg and Scale clips, between 0.25 and 3600. Omitted: the engine uses 0.25 | 0.5 |
|
params.timer_iceberg_delay_min |
number | Lower bound, in seconds, of the Iceberg/Scale clip delay. May be 0. Set together with timer_iceberg_delay_max. When both are set, the engine draws once from this band instead of 80–120% of timer_iceberg_delay | 0 |
|
params.timer_iceberg_delay_max |
number | Upper bound, in seconds, of the Iceberg/Scale clip delay, up to 3600. Set together with timer_iceberg_delay_min | 10 |
|
params.randomize_iceberg_timer |
boolean | Randomize the Iceberg/Scale clip delay between 80% and 120% of timer_iceberg_delay. A min/max band replaces that draw when both bounds are set. Omitted: the engine uses true. Explicit false cannot be combined with the band | ||
params.extend_duration |
boolean | TWAP, VWAP, and IS: extend the scheduled end past duration_seconds by a buffer, still capped by end_time. Omitted: the engine uses true | ||
trades |
array[TradeDetails] | The list of trades associated with this order when include_trades=true | ||
trades[].trade_id |
string | The trade id assigned by the exchange, or the Anboto platform trade id when no exchange trade id was captured | 1204004183 |
|
trades[].symbol |
string | required | The symbol of the fill in Anboto's symbology | BTC/USDT:USDT |
trades[].exchange_order_id |
string | The exchange order id of the child order the fill belongs to | 151990408 |
|
trades[].client_order_id |
string | The client order id of the child order the fill belongs to | ||
trades[].quantity |
number | required | The absolute amount filled by this trade, in base asset | 0.5 |
trades[].price |
number | required | The traded price | 92.91 |
trades[].direction |
enum | The direction of the trade — BUY, SELL |
BUY |
|
trades[].maker_or_taker |
enum | Whether the fill was made as maker or taker — MAKER, TAKER |
MAKER |
|
trades[].exec_time |
integer | The execution time of the trade as ms since epoch | 1758276000000 |
|
trades[].fee |
number | The fee charged on the trade, in fee_currency | 0.0021 |
|
trades[].fee_currency |
string | The asset the fee was charged in | USDT |
|
trades[].parent_order_id |
integer | The Anboto id of the parent order the fill belongs to (the order_id of the enclosing order) | 596990285759373312 |
|
trades[].child_order_id |
integer | The Anboto id of the child (slice) order that executed on the exchange; the WebSocket trade topic carries it as order_id | 596990290020118528 |
|
fees_infos |
object | Aggregated fees per currency when include_fees=true |
OrderDetailsList#
| Field | Type | Description | Example | |
|---|---|---|---|---|
orders |
array[OrderDetails] | required | The list of order details for separate orders. | |
orders[].order_id |
integer | The Anboto generated order id | 123456 |
|
orders[].client_order_id |
string | The client provided order id | xxx-yyy-zzz |
|
orders[].symbol |
string | The order symbol in Anboto's symbology | ||
orders[].status |
enum | The order status — PENDING_NEW, ACCEPTED, REJECTED, PARTIALLY_FILLED, FILLED, PENDING_CANCEL, CANCELLED, PENDING_PAUSE, … (12 values) |
||
orders[].asset_class |
enum | The Asset category of the order. — SPOT, FUTURE |
SPOT |
|
orders[].exchange |
enum | The exchanges available for order placement via the API — BINANCE, HUOBI, GATEIO, KRAKEN, KUCOIN, OKX, BYBIT, BITGET, … (17 values) |
||
orders[].strategy |
enum | The execution strategy for the order. — TWAP, VWAP, ICEBERG, POV, MARKET, LIMIT, IS, SCALE |
VWAP |
|
orders[].start_time |
number | The time when the order start trading from epoch time in ms | ||
orders[].end_time |
number | The scheduled end of the execution from epoch time in ms while the order is working (e.g. start_time + duration for a TWAP); the time the order reached its terminal state once finished | ||
orders[].quantity |
number | The total quantity of the parent order in base asset, as placed. Absent for value-target (notional) orders, see target_value | 6 |
|
orders[].filled_quantity |
number | required | The absolute amount of the order quantity filled | 0 |
orders[].leaves_quantity |
number | required | The absolute amount of the parent order quantity remaining to be filled (quantity - filled_quantity, 0 once the order is terminal). This is the parent order's remainder, never the leaves of the child order currently working it | 0 |
orders[].progress |
number | Execution progress of the parent order between 0 and 1: filled_quantity / quantity, or filled notional / target_value for value-target orders. Same computation as the WebSocket order topic orderProgress; 1 once FILLED. Absent when the parent order is not known | 0.1783 |
|
orders[].side |
enum | The side of the book to trade. — BUY, SELL |
||
orders[].last_quantity |
number | required | The last qty received in a fill from the exchange | 0 |
orders[].last_price |
number | required | The last price executed on the exchange | 0 |
orders[].average_price |
number | required | The average execution price of the order | 0 |
orders[].limit_price |
number | The limit price of the parent order, if one was set | ||
orders[].clip_size_type |
enum | The clip size for the child orders. The default is AUTOMATIC — ABSOLUTE, PERCENTAGE, AUTOMATIC, ORDER_COUNT |
||
orders[].clip_size_val |
number | The clip size value of the parent order, as placed | ||
orders[].target_value |
number | The target notional of a value-target order (e.g. a multi-leg order leg); quantity is absent for such orders | ||
orders[].params |
OrderParams | The advanced order parameters to modify the execution behavior. | ||
orders[].trades |
array[TradeDetails] | The list of trades associated with this order when include_trades=true | ||
orders[].fees_infos |
object | Aggregated fees per currency when include_fees=true |
OrderLegParams#
The advanced order parameters to modify the execution behavior.
| Field | Type | Description | Example | |
|---|---|---|---|---|
duration_seconds |
string | The duration of the order in seconds, this is a required field for TWAP and VWAP. | 120 |
|
trading_style |
enum | The trading style of the order, the default is HYBRID — PASSIVE, AGGRESSIVE, HYBRID |
||
urgency |
enum | The Urgency or Risk Aversion of the IS strategy, the default is MEDIUM. The parameter is not case-sensitive. Each risk aversion levels correspond to a lambda value, "that is, how much we penalize variance relative to expected cost" Low : 0.2e-6 Medium: 1e-6 High: 5e-6 Based on the paper from Almgren Chriss https://www.smallake.kr/wp-content/uploads/2016/03/optliq.pdf — LOW, MEDIUM, HIGH |
||
randomize_amount |
boolean | Whether to randomize the slice amount | ||
would |
WouldInfo | Information to instruct how to execute a Would price trigger. | ||
would.would_price |
string | The price to trigger Would mode | ||
would.would_pct |
string | required | The percent of the order to trade when the Would price triggers | |
would.would_style |
enum | required | The trading style of the order, the default is HYBRID — PASSIVE, AGGRESSIVE, HYBRID |
|
would.would_is_arrival |
boolean | Would price as arrival price | ||
would.would_bps |
string | Bps better than the would reference (arrival or would_price) before would children trigger. Default: 1 with would_is_arrival, 0 with would_price | 5 |
|
trigger |
TriggerInfo | Information related to how the order should be triggered. | ||
trigger.trigger_price |
string | required | The price to monitor for the trigger | |
trigger.trigger_condition |
enum | required | The trigger condition to start the order — ABOVE, BELOW |
|
placement_infos |
PlacementInfo | How to place an order into the book | ||
placement_infos.placement_mode |
enum | required | The style used to place an order in the book. DEFAULT is the default and will be at the discretion of the trading strategy — DEFAULT, TIGHT, CUSTOM |
|
placement_infos.placement |
string | Where to place new orders in the book. With depth_mode level (default) it is a book level, e.g. 2 places at the second best price. With depth_mode bps_spread it is basis points from the midpoint, a whole number from 1 to 500. | ||
placement_infos.cancel |
string | When to cancel a resting order. With depth_mode level (default) it is a book level, e.g. 6 cancels the order once it is at level 6 of the book. With depth_mode bps_spread it is basis points from the midpoint, a whole number greater than placement and at most 1000. | ||
placement_infos.depth_mode |
enum | How placement and cancel are measured. LEVEL walks the book. BPS_SPREAD is basis points from the midpoint. Omitted means LEVEL. — LEVEL, BPS_SPREAD |
||
is_leading |
boolean | true if this is a leading leg | ||
timer_iceberg_delay |
number | Seconds between Iceberg and Scale clips, between 0.25 and 3600. Omitted: the engine uses 0.25 | 0.5 |
|
timer_iceberg_delay_min |
number | Lower bound, in seconds, of the Iceberg/Scale clip delay. May be 0. Set together with timer_iceberg_delay_max | 0 |
|
timer_iceberg_delay_max |
number | Upper bound, in seconds, of the Iceberg/Scale clip delay, up to 3600. Set together with timer_iceberg_delay_min | 10 |
|
randomize_iceberg_timer |
boolean | Randomize the Iceberg/Scale clip delay between 80% and 120% of timer_iceberg_delay. A min/max band replaces that draw when both bounds are set. Omitted: the engine uses true. Explicit false cannot be combined with the band | ||
extend_duration |
boolean | TWAP, VWAP, and IS: extend the scheduled end past duration_seconds by a buffer, still capped by end_time. Omitted: the engine uses true |
OrderParams#
The advanced order parameters to modify the execution behavior.
| Field | Type | Description | Example | |
|---|---|---|---|---|
duration_seconds |
string | The duration of the order in seconds, this is a required field for TWAP and VWAP. | 120 |
|
trading_style |
enum | The trading style of the order, the default is HYBRID — PASSIVE, AGGRESSIVE, HYBRID |
||
urgency |
enum | The Urgency or Risk Aversion of the IS strategy, the default is MEDIUM. The parameter is not case-sensitive. Each risk aversion levels correspond to a lambda value, "that is, how much we penalize variance relative to expected cost" Low : 0.2e-6 Medium: 1e-6 High: 5e-6 Based on the paper from Almgren Chriss https://www.smallake.kr/wp-content/uploads/2016/03/optliq.pdf — LOW, MEDIUM, HIGH |
||
pov_ratio |
number | Target participation in market volume, in percent (e.g. 5 = 5 %). Required for POV, between 0.01 and 33 | 5 |
|
pov_risk |
enum | How far the POV strategy may fall behind its target before it sends the next child order: LOW 2 %, DEFAULT 7.5 %, HIGH 15 % of the executed quantity. The parameter is not case-sensitive. — LOW, DEFAULT, HIGH |
||
randomize_amount |
boolean | Whether to randomize the slice amount | ||
would |
WouldInfo | Information to instruct how to execute a Would price trigger. | ||
would.would_price |
string | The price to trigger Would mode | ||
would.would_pct |
string | required | The percent of the order to trade when the Would price triggers | |
would.would_style |
enum | required | The trading style of the order, the default is HYBRID — PASSIVE, AGGRESSIVE, HYBRID |
|
would.would_is_arrival |
boolean | Would price as arrival price | ||
would.would_bps |
string | Bps better than the would reference (arrival or would_price) before would children trigger. Default: 1 with would_is_arrival, 0 with would_price | 5 |
|
trigger |
TriggerInfo | Information related to how the order should be triggered. | ||
trigger.trigger_price |
string | required | The price to monitor for the trigger | |
trigger.trigger_condition |
enum | required | The trigger condition to start the order — ABOVE, BELOW |
|
placement_infos |
PlacementInfo | How to place an order into the book | ||
placement_infos.placement_mode |
enum | required | The style used to place an order in the book. DEFAULT is the default and will be at the discretion of the trading strategy — DEFAULT, TIGHT, CUSTOM |
|
placement_infos.placement |
string | Where to place new orders in the book. With depth_mode level (default) it is a book level, e.g. 2 places at the second best price. With depth_mode bps_spread it is basis points from the midpoint, a whole number from 1 to 500. | ||
placement_infos.cancel |
string | When to cancel a resting order. With depth_mode level (default) it is a book level, e.g. 6 cancels the order once it is at level 6 of the book. With depth_mode bps_spread it is basis points from the midpoint, a whole number greater than placement and at most 1000. | ||
placement_infos.depth_mode |
enum | How placement and cancel are measured. LEVEL walks the book. BPS_SPREAD is basis points from the midpoint. Omitted means LEVEL. — LEVEL, BPS_SPREAD |
||
reduce_only |
boolean | Reduce Only for future positions | ||
start_ladder_price |
string | Start price for Scale (ICEBERG) ladder | ||
end_ladder_price |
string | End price for Scale (ICEBERG) ladder | ||
ladder_direction |
string | Scale ladder direction: upwards or downwards | ||
ladder_profile |
string | Scale ladder profile. Default: linear | ||
size_skew |
number | Scale size skew (1 = linear). Default: 1 | ||
ob_imbalance_cancel |
boolean | Cancel resting child orders and pause re-posting while the orderbook L1 imbalance leans against the order | ||
ob_imbalance_threshold |
string | Opposing-side share of L1 quantity that triggers the imbalance cancel, between 0.5 and 0.99. Default: 0.75. Only used with ob_imbalance_cancel | 0.75 |
|
price_lock_bps |
string | Opportunistic completion: take the full remainder aggressively when the market is this many bps better than the arrival price, between 1 and 100 | 5 |
|
limit_is_arrival |
boolean | Use the arrival price (the midpoint when Anboto accepts the order) as the limit price; limit_bps shifts it. Mutually exclusive with top-level limit_price. | ||
limit_bps |
string | Signed bps vs the parent cap (arrival or numeric limit_price). Positive = must be better; negative = may be worse. Range -100 to 100. Omitted or 0 leaves the cap unchanged. | -10 |
|
timer_iceberg_delay |
number | Seconds between Iceberg and Scale clips, between 0.25 and 3600. Omitted: the engine uses 0.25 | 0.5 |
|
timer_iceberg_delay_min |
number | Lower bound, in seconds, of the Iceberg/Scale clip delay. May be 0. Set together with timer_iceberg_delay_max. When both are set, the engine draws once from this band instead of 80–120% of timer_iceberg_delay | 0 |
|
timer_iceberg_delay_max |
number | Upper bound, in seconds, of the Iceberg/Scale clip delay, up to 3600. Set together with timer_iceberg_delay_min | 10 |
|
randomize_iceberg_timer |
boolean | Randomize the Iceberg/Scale clip delay between 80% and 120% of timer_iceberg_delay. A min/max band replaces that draw when both bounds are set. Omitted: the engine uses true. Explicit false cannot be combined with the band | ||
extend_duration |
boolean | TWAP, VWAP, and IS: extend the scheduled end past duration_seconds by a buffer, still capped by end_time. Omitted: the engine uses true |
OrderStatus#
The order status
Values: PENDING_NEW, ACCEPTED, REJECTED, PARTIALLY_FILLED, FILLED, PENDING_CANCEL, CANCELLED, PENDING_PAUSE, PAUSED, PENDING_UNPAUSE, EXPIRED, CANCEL_REJECTED
OrderSummary#
Summarizes the state of the parent order
| Field | Type | Description | Example | |
|---|---|---|---|---|
order_id |
integer | The Anboto assigned order identifier | ||
client_order_id |
string | A custom string to identify the order | ABC-12345^12-10-23 |
|
status |
enum | The order status — PENDING_NEW, ACCEPTED, REJECTED, PARTIALLY_FILLED, FILLED, PENDING_CANCEL, CANCELLED, PENDING_PAUSE, … (12 values) |
||
created_at |
date-time | required | The time in UTC when the order was created | 2024-01-22T22:05:00Z |
message |
string | Any additional information, usually if the order was rejected | ||
error_code |
enum | The error code used to describe why an order was rejected. — OTHER, QUANTITY_EXCEED, AUTHENTICATION_ERROR, INSUFFICIENT_FUNDS, RATE_LIMIT_EXCEEDED, DDOS_PROTECTION, EXCHANGE_NOT_AVAILABLE, NETWORK_ERROR, … (34 values) |
INVALID_ORDER |
OrderSummaryList#
| Field | Type | Description | Example | |
|---|---|---|---|---|
orders |
array[OrderSummary] | required | The list of order summaries for separate orders. | |
orders[].order_id |
integer | The Anboto assigned order identifier | ||
orders[].client_order_id |
string | A custom string to identify the order | ABC-12345^12-10-23 |
|
orders[].status |
enum | The order status — PENDING_NEW, ACCEPTED, REJECTED, PARTIALLY_FILLED, FILLED, PENDING_CANCEL, CANCELLED, PENDING_PAUSE, … (12 values) |
||
orders[].created_at |
date-time | required | The time in UTC when the order was created | 2024-01-22T22:05:00Z |
orders[].message |
string | Any additional information, usually if the order was rejected | ||
orders[].error_code |
enum | The error code used to describe why an order was rejected. — OTHER, QUANTITY_EXCEED, AUTHENTICATION_ERROR, INSUFFICIENT_FUNDS, RATE_LIMIT_EXCEEDED, DDOS_PROTECTION, EXCHANGE_NOT_AVAILABLE, NETWORK_ERROR, … (34 values) |
INVALID_ORDER |
PlacementInfo#
How to place an order into the book
| Field | Type | Description | Example | |
|---|---|---|---|---|
placement_mode |
enum | required | The style used to place an order in the book. DEFAULT is the default and will be at the discretion of the trading strategy — DEFAULT, TIGHT, CUSTOM |
|
placement |
string | Where to place new orders in the book. With depth_mode level (default) it is a book level, e.g. 2 places at the second best price. With depth_mode bps_spread it is basis points from the midpoint, a whole number from 1 to 500. | ||
cancel |
string | When to cancel a resting order. With depth_mode level (default) it is a book level, e.g. 6 cancels the order once it is at level 6 of the book. With depth_mode bps_spread it is basis points from the midpoint, a whole number greater than placement and at most 1000. | ||
depth_mode |
enum | How placement and cancel are measured. LEVEL walks the book. BPS_SPREAD is basis points from the midpoint. Omitted means LEVEL. — LEVEL, BPS_SPREAD |
PlacementMode#
The style used to place an order in the book. DEFAULT is the default and will be at the discretion of the trading strategy
Values: DEFAULT, TIGHT, CUSTOM
PnlDateRange#
First and last UTC day of a run of PnL points
| Field | Type | Description | Example | |
|---|---|---|---|---|
first_date |
date | required | First day (YYYY-MM-DD, UTC) | |
last_date |
date | required | Last day (YYYY-MM-DD, UTC) |
PnlGroup#
PnL of one group of accounts. Ratio fields are null when not computed per group
| Field | Type | Description | Example | |
|---|---|---|---|---|
key |
PnlGroupKey | required | Identity of a PnL group | |
key.exchange |
string | required | ||
key.subaccount |
string | required | "" is the main account; null when grouping by exchange | |
key.market |
string | required | Reserved for a later market grouping; null today | |
as_of |
date-time | required | UTC time of the newest live snapshot used for this group's today_pnl | |
today_pnl |
number | required | Group PnL since 00:00 UTC; null when not available for this group | |
cumulative_pnl |
number | required | Sum of the group's daily_pnl over the window | |
period_return_pct |
number | required | Simple return of the group over the window, in percent | |
since_inception_pnl |
number | required | ||
since_inception_return_pct |
number | required | ||
since_inception_date |
date | required | ||
sharpe |
number | required | ||
max_drawdown_pct |
number | required | In percent (≤ 0) | |
estimated |
boolean | True when at least one of the group's days is estimated | ||
reconstructed_range |
PnlDateRange | required | First and last UTC day of a run of PnL points | |
reconstructed_range.first_date |
date | required | First day (YYYY-MM-DD, UTC) | |
reconstructed_range.last_date |
date | required | Last day (YYYY-MM-DD, UTC) | |
point_count |
integer | required | Number of points in series | |
series |
array[PnlPoint] | required | Only the days of total.series on which the group had data; a missing day contributed 0 | |
series[].date |
date | required | UTC day (YYYY-MM-DD) | |
series[].daily_pnl |
number | required | PnL of the day, net of deposits and withdrawals | |
series[].net_flows |
number | required | Net external flows of the day: positive for deposits, negative for withdrawals | |
series[].equity_close |
number | required | Equity at the day's close (00:00 UTC of the next day) | |
series[].equity_prev |
number | Equity at the previous close; the denominator of a time-weighted return | ||
series[].daily_return_pct |
number | required | daily_pnl over the flow-adjusted previous equity, in percent | |
series[].drawdown_pct |
number | required | Drawdown from the running peak, in percent (≤ 0) | |
series[].daily_unrealized_pnl |
number | required | Change of unrealised PnL over the day, where the exchange reports it | |
series[].unrealized_pnl_close |
number | required | Unrealised PnL at the close, where the exchange reports it | |
series[].quality |
enum | required | ok, or estimated when the close was not taken from a snapshot — ok, estimated |
|
series[].reconstructed |
boolean | required | True when the day's close or the previous close was rebuilt from the account's fills, income history and daily mark prices, for days before its first stored daily close. quality is estimated on those days |
PnlGroupKey#
Identity of a PnL group
| Field | Type | Description | Example | |
|---|---|---|---|---|
exchange |
string | required | ||
subaccount |
string | required | "" is the main account; null when grouping by exchange | |
market |
string | required | Reserved for a later market grouping; null today |
PnlPoint#
One UTC day. daily_pnl = equity_close - equity_prev - net_flows
| Field | Type | Description | Example | |
|---|---|---|---|---|
date |
date | required | UTC day (YYYY-MM-DD) | |
daily_pnl |
number | required | PnL of the day, net of deposits and withdrawals | |
net_flows |
number | required | Net external flows of the day: positive for deposits, negative for withdrawals | |
equity_close |
number | required | Equity at the day's close (00:00 UTC of the next day) | |
equity_prev |
number | Equity at the previous close; the denominator of a time-weighted return | ||
daily_return_pct |
number | required | daily_pnl over the flow-adjusted previous equity, in percent | |
drawdown_pct |
number | required | Drawdown from the running peak, in percent (≤ 0) | |
daily_unrealized_pnl |
number | required | Change of unrealised PnL over the day, where the exchange reports it | |
unrealized_pnl_close |
number | required | Unrealised PnL at the close, where the exchange reports it | |
quality |
enum | required | ok, or estimated when the close was not taken from a snapshot — ok, estimated |
|
reconstructed |
boolean | required | True when the day's close or the previous close was rebuilt from the account's fills, income history and daily mark prices, for days before its first stored daily close. quality is estimated on those days |
PnlSummary#
PnL figures and daily series of a selection
| Field | Type | Description | Example | |
|---|---|---|---|---|
today_pnl |
number | required | PnL since 00:00 UTC from live equity; null when no live snapshot exists or a flow today could not be priced | |
cumulative_pnl |
number | required | Sum of daily_pnl over the window | |
period_return_pct |
number | required | Simple return over the window in percent: cumulative_pnl over the first flow-adjusted equity (not time-weighted) | |
since_inception_pnl |
number | required | PnL since the selection's first closed day | |
since_inception_return_pct |
number | required | Simple return since inception, in percent | |
since_inception_date |
date | required | First closed day of the selection (YYYY-MM-DD) | |
sharpe |
number | required | Sharpe ratio of the daily returns, annualised with √365; null with fewer than 2 points | |
max_drawdown_pct |
number | required | Largest peak-to-trough drawdown in the window, in percent (≤ 0) | |
estimated |
boolean | True when at least one day in the window is estimated rather than closed from snapshots | ||
reconstructed_range |
PnlDateRange | required | First and last UTC day of a run of PnL points | |
reconstructed_range.first_date |
date | required | First day (YYYY-MM-DD, UTC) | |
reconstructed_range.last_date |
date | required | Last day (YYYY-MM-DD, UTC) | |
point_count |
integer | required | Number of points in series | |
series |
array[PnlPoint] | required | One point per UTC day, oldest first. Days without comparable data are skipped | |
series[].date |
date | required | UTC day (YYYY-MM-DD) | |
series[].daily_pnl |
number | required | PnL of the day, net of deposits and withdrawals | |
series[].net_flows |
number | required | Net external flows of the day: positive for deposits, negative for withdrawals | |
series[].equity_close |
number | required | Equity at the day's close (00:00 UTC of the next day) | |
series[].equity_prev |
number | Equity at the previous close; the denominator of a time-weighted return | ||
series[].daily_return_pct |
number | required | daily_pnl over the flow-adjusted previous equity, in percent | |
series[].drawdown_pct |
number | required | Drawdown from the running peak, in percent (≤ 0) | |
series[].daily_unrealized_pnl |
number | required | Change of unrealised PnL over the day, where the exchange reports it | |
series[].unrealized_pnl_close |
number | required | Unrealised PnL at the close, where the exchange reports it | |
series[].quality |
enum | required | ok, or estimated when the close was not taken from a snapshot — ok, estimated |
|
series[].reconstructed |
boolean | required | True when the day's close or the previous close was rebuilt from the account's fills, income history and daily mark prices, for days before its first stored daily close. quality is estimated on those days |
PortfolioAccountRef#
An exchange account: main account, one subaccount, or every account on the exchange
| Field | Type | Description | Example | |
|---|---|---|---|---|
exchange |
string | required | Exchange code, e.g. binance | |
subaccount |
string | required | Subaccount name; "" is the main account and null means every account on the exchange |
PortfolioFlowsResponse#
Deposits, withdrawals and internal transfers of the team
| Field | Type | Description | Example | |
|---|---|---|---|---|
from_ms |
integer | required | Start of the window, ms since epoch (inclusive) | |
to_ms |
integer | required | End of the window, ms since epoch (exclusive): a flow at exactly to_ms is not in this window. Pass it as startMs to read the next window | |
flows |
array[FlowRecord] | required | Flows of this page, oldest first | |
flows[].id |
string | required | Stable identifier of the flow | |
flows[].time |
integer | required | Event time, ms since epoch | |
flows[].exchange |
string | required | ||
flows[].subaccount |
string | required | "" is the main account | |
flows[].type |
enum | required | deposit, withdrawal, internal_transfer |
|
flows[].direction |
enum | required | Direction for this account — in, out, internal, unknown |
|
flows[].external |
boolean | required | True for flows that cross the team's boundary (deposits and withdrawals) | |
flows[].asset |
string | required | ||
flows[].qty |
number | required | Absolute amount of the asset, with every stored decimal digit | |
flows[].usd_value |
number | required | USD value at the event time; null when the asset could not be priced | |
flows[].net_flow_usd |
number | required | Signed contribution to the total-scope net_flows of the daily PnL (positive in, negative out). 0 for transfers within one account (whatever the price) and for unknown directions. null when the asset could not be priced: the flow is then not in the USD totals and is counted in totals.unpriced_count. counted_in_pnl is false whenever net_flow_usd is 0 for those reasons or null | |
flows[].counted_in_pnl |
boolean | required | Whether the flow moves net_flows of the daily PnL: true when net_flow_usd is not null and direction is in or out | |
flows[].source |
string | required | Exchange history the flow was read from, e.g. binance_deposit, binance_sub_transfer | |
totals |
FlowTotals | required | Sums of net_flow_usd over the whole window and selection | |
totals.deposits_usd |
number | required | Sum of deposits (≥ 0) | |
totals.withdrawals_usd |
number | required | Sum of withdrawals, signed (≤ 0) | |
totals.net_external_usd |
number | required | deposits_usd + withdrawals_usd | |
totals.net_internal_usd |
number | required | Net of internal transfers counted in PnL (non-zero when the selection is part of the team) | |
totals.unpriced_count |
integer | required | Flows whose net_flow_usd is null (unpriced); they are not in the USD sums | |
next_cursor |
string | required | Pass as cursor to read the next page; null on the last page |
PortfolioLedgerResponse#
Realized PnL, funding and fees from the exchange income history
| Field | Type | Description | Example | |
|---|---|---|---|---|
as_of |
date-time | required | UTC time of the newest ingested income data | |
from_date |
date | required | First day of the window (YYYY-MM-DD, UTC) | |
to_date |
date | required | Last day of the window (YYYY-MM-DD, UTC); today's figures are provisional | |
group_by |
enum | required | Grouping of rows — day, symbol, day_symbol |
|
currency |
string | required | Currency of every money value | USD |
coverage |
array[LedgerCoverage] | required | Ingestion status per account and market. Unsupported venues are listed here, not reported as zero | |
coverage[].exchange |
string | required | ||
coverage[].subaccount |
string | required | "" is the main account; null means every account on the exchange | |
coverage[].market |
enum | required | spot, future |
|
coverage[].status |
enum | required | complete, partial, unsupported |
|
coverage[].ingested_through |
date-time | required | UTC time up to which income is ingested | |
coverage[].reason |
string | required | Why the account is partial or unsupported, e.g. exchange_not_supported, key_invalid | |
totals |
LedgerTotals | required | Income components in USD. net is the net realized PnL of the futures scopes only: spot trading fees are in commission and fee_rebate but not in net. Every value is null when no day of the window is covered | |
totals.realized_pnl |
number | required | Realized trading PnL; null when the selection has no futures scope | |
totals.funding |
number | required | Funding: positive when received; null when the selection has no futures scope | |
totals.commission |
number | required | Trading fees (≤ 0) | |
totals.fee_rebate |
number | required | Fee rebates (≥ 0) | |
totals.interest |
number | required | Margin interest: not ingested, 0 | |
totals.other |
number | required | Other PnL-relevant income; null when the selection has no futures scope | |
totals.net |
number | required | Net realized (futures): the sum of the futures components. Spot trading fees are in commission and fee_rebate but not in net, so with a spot scope in the selection net is not the sum of the values above. Null when the selection has no futures scope | |
unpriced_assets |
array[string] | Assets with income rows that could not be valued in USD; those amounts are missing from the USD figures | ||
rows |
array[LedgerRow] | required | One row per day, symbol or day and symbol, depending on group_by | |
rows[].date |
date | required | UTC day (YYYY-MM-DD); null when group_by is symbol | |
rows[].exchange |
string | required | ||
rows[].subaccount |
string | required | "" is the main account | |
rows[].symbol |
string | required | Anboto symbol, e.g. BTC/USDT:USDT (futures) or BTC/USDT (spot); null when group_by is day or for income without a symbol | |
rows[].market |
enum | required | spot, future |
|
rows[].realized_pnl |
number | required | Realized trading PnL; null for market spot (trading fees only), never 0 | |
rows[].funding |
number | required | Funding; null for market spot (trading fees only), never 0 | |
rows[].commission |
number | required | Trading fees (≤ 0), spot and futures | |
rows[].fee_rebate |
number | required | Fee rebates (≥ 0), spot and futures | |
rows[].interest |
number | required | Margin interest: not ingested, 0 | |
rows[].other |
number | required | Other PnL-relevant income; null for market spot (trading fees only), never 0 | |
rows[].net |
number | required | Net realized (futures): sum of the row's components. Null for market spot: spot trading fees are in commission and fee_rebate only, never in net | |
next_cursor |
string | required | Pass as cursor to read the next page; null on the last page |
PortfolioPnlResponse#
NAV daily PnL of the team, overall and per group
| Field | Type | Description | Example | |
|---|---|---|---|---|
as_of |
date-time | required | UTC time of the newest live equity snapshot used for today_pnl; null when none was available | |
nav_usd |
number | required | Net asset value of the selection now: the sum of each account's newest live equity snapshot (at most 3 days old; for scope spot or future, that wallet's equity), in USD. Null when no snapshot was available | |
from_date |
date | required | First day of the window (YYYY-MM-DD, UTC), as applied | |
to_date |
date | required | Last day of the window (YYYY-MM-DD, UTC), as applied. Days are closed at 00:00 UTC, so this is at most yesterday | |
scope |
enum | required | Wallet scope — total, spot, future |
|
group_by |
enum | required | Grouping of groups — none, exchange, account |
|
currency |
string | required | Currency of every money value | USD |
accounts |
array[PortfolioAccountRef] | required | The resolved account selection; null when the request covered every account of the team | |
accounts[].exchange |
string | required | Exchange code, e.g. binance | |
accounts[].subaccount |
string | required | Subaccount name; "" is the main account and null means every account on the exchange | |
uncovered_exchanges |
array[string] | Requested or connected exchanges without daily PnL coverage. They are left out of every figure, never counted as zero | ||
total |
PnlSummary | required | PnL figures and daily series of a selection | |
total.today_pnl |
number | required | PnL since 00:00 UTC from live equity; null when no live snapshot exists or a flow today could not be priced | |
total.cumulative_pnl |
number | required | Sum of daily_pnl over the window | |
total.period_return_pct |
number | required | Simple return over the window in percent: cumulative_pnl over the first flow-adjusted equity (not time-weighted) | |
total.since_inception_pnl |
number | required | PnL since the selection's first closed day | |
total.since_inception_return_pct |
number | required | Simple return since inception, in percent | |
total.since_inception_date |
date | required | First closed day of the selection (YYYY-MM-DD) | |
total.sharpe |
number | required | Sharpe ratio of the daily returns, annualised with √365; null with fewer than 2 points | |
total.max_drawdown_pct |
number | required | Largest peak-to-trough drawdown in the window, in percent (≤ 0) | |
total.estimated |
boolean | True when at least one day in the window is estimated rather than closed from snapshots | ||
total.reconstructed_range |
PnlDateRange | required | First and last UTC day of a run of PnL points | |
total.point_count |
integer | required | Number of points in series | |
total.series |
array[PnlPoint] | required | One point per UTC day, oldest first. Days without comparable data are skipped | |
groups |
array[PnlGroup] | One entry per exchange or account; present only when group_by is not none. Money values add up to total; ratios (returns, sharpe, drawdown) do not |
||
groups[].key |
PnlGroupKey | required | Identity of a PnL group | |
groups[].as_of |
date-time | required | UTC time of the newest live snapshot used for this group's today_pnl | |
groups[].today_pnl |
number | required | Group PnL since 00:00 UTC; null when not available for this group | |
groups[].cumulative_pnl |
number | required | Sum of the group's daily_pnl over the window | |
groups[].period_return_pct |
number | required | Simple return of the group over the window, in percent | |
groups[].since_inception_pnl |
number | required | ||
groups[].since_inception_return_pct |
number | required | ||
groups[].since_inception_date |
date | required | ||
groups[].sharpe |
number | required | ||
groups[].max_drawdown_pct |
number | required | In percent (≤ 0) | |
groups[].estimated |
boolean | True when at least one of the group's days is estimated | ||
groups[].reconstructed_range |
PnlDateRange | required | First and last UTC day of a run of PnL points | |
groups[].point_count |
integer | required | Number of points in series | |
groups[].series |
array[PnlPoint] | required | Only the days of total.series on which the group had data; a missing day contributed 0 |
PovRisk#
How far the POV strategy may fall behind its target before it sends the next child order: LOW 2 %, DEFAULT 7.5 %, HIGH 15 % of the executed quantity. The parameter is not case-sensitive.
Values: LOW, DEFAULT, HIGH
PreTradeAdvice#
Advised durations, on Anboto's duration ladder
| Field | Type | Description | Example | |
|---|---|---|---|---|
safe_duration_seconds |
integer | Shortest duration rated LOW | ||
moderate_duration_seconds |
integer | Shortest duration rated MEDIUM or better |
PreTradeAnalysis#
Pre-trade analysis of an order, from Anboto's live market snapshot
| Field | Type | Description | Example | |
|---|---|---|---|---|
supported |
boolean | required | False when the venue or symbol cannot be analysed; see missing | |
missing |
array[string] | required | Inputs that could not be sourced (e.g. deep_book, ohlcv_1m) or why the analysis is unavailable (disabled, exchange_not_supported, timeout, rejected, error, stale) | |
snapshot_timestamp |
integer | Epoch ms of the market snapshot used; null when no snapshot could be read (disabled, exchange_not_supported, timeout, rejected, error) | ||
market |
object | |||
impact |
PreTradeImpact | Participation and impact tier at the requested duration | ||
impact.tier |
enum | Null when no duration was given — LOW, MEDIUM, HIGH |
||
impact.duration_seconds |
integer | |||
impact.volume_participation_pct |
number | Percent of the median 5-minute volume | ||
impact.order_book_participation_pct |
number | Percent of the book depth within 20 bps, per minute | ||
impact.book_safe |
boolean | The book depth can absorb the flow | ||
impact.model |
PreTradeImpactModel | required | Participation at a reference duration; pct(D) = pct × reference_duration_seconds / D. Volume participation above medium_pct is MEDIUM and above high_pct is HIGH, with the low order book thresholds while the order book participation is below low_order_book_participation_pct | |
execution |
object | |||
advice |
PreTradeAdvice | Advised durations, on Anboto's duration ladder | ||
advice.safe_duration_seconds |
integer | Shortest duration rated LOW | ||
advice.moderate_duration_seconds |
integer | Shortest duration rated MEDIUM or better | ||
pov |
PreTradePov | POV model. At a participation p the order trades k = p / (1 - 2p) of everyone else's volume, because the engine counts its own fills. The impact tier depends on p alone: pace_vs_market_pct above medium_pct is MEDIUM, above high_pct is HIGH, whatever the book depth. The quantity only sets the time to fill. | ||
pov.pov_ratio_pct |
number | required | Requested participation, percent of market volume | |
pov.pace_vs_market_pct |
number | required | Order flow as a share of the rest of the market (k) | |
pov.share_of_total_pct |
number | required | Order flow as a share of all market volume, own fills included | |
pov.estimated_fill_seconds |
integer | Time to fill the quantity if market volume stays at its recent median 5-minute volume. An estimate only: POV speeds up when volume rises and slows down when it falls; passive and hybrid styles, or a limit price, can be slower | ||
pov.estimated_fill_seconds_24h |
integer | Same at the 24h average volume | ||
pov.thresholds |
PreTradeThresholds | required | ||
pov.safe_pov_pct |
number | Largest ladder participation rated LOW | ||
pov.moderate_pov_pct |
number | Largest ladder participation rated MEDIUM or better | ||
pov.high_pov_pct |
number | Smallest ladder participation rated HIGH | ||
cost_estimate |
PreTradeCostEstimate | Expected execution cost from a market-impact model (Almgren, Thum, Hauptmann and Li, 2005) with its published coefficients, in basis points of the arrival price. Assumes normal liquidity: market makers refill the book and nobody trades heavily against the order. calibrated is false until the coefficients are fitted on Anboto fills. | ||
cost_estimate.slippage_bps |
number | required | Expected average execution price against arrival | |
cost_estimate.price_move_bps |
number | required | Expected price move by the end of the execution | |
cost_estimate.permanent_bps |
number | required | Part of the move expected to remain after the order | |
cost_estimate.market_risk_bps |
number | required | One standard deviation of the market's own move over the execution time | |
cost_estimate.horizon_seconds |
integer | required | Execution time assumed: the duration, or the POV time to fill | |
cost_estimate.pace_pct |
number | required | Order flow as a share of the rest of the market | |
cost_estimate.model |
string | required | ||
cost_estimate.calibrated |
boolean | required |
PreTradeCostEstimate#
Expected execution cost from a market-impact model (Almgren, Thum, Hauptmann and Li, 2005) with its published coefficients, in basis points of the arrival price. Assumes normal liquidity: market makers refill the book and nobody trades heavily against the order. calibrated is false until the coefficients are fitted on Anboto fills.
| Field | Type | Description | Example | |
|---|---|---|---|---|
slippage_bps |
number | required | Expected average execution price against arrival | |
price_move_bps |
number | required | Expected price move by the end of the execution | |
permanent_bps |
number | required | Part of the move expected to remain after the order | |
market_risk_bps |
number | required | One standard deviation of the market's own move over the execution time | |
horizon_seconds |
integer | required | Execution time assumed: the duration, or the POV time to fill | |
pace_pct |
number | required | Order flow as a share of the rest of the market | |
model |
string | required | ||
calibrated |
boolean | required |
PreTradeExecution#
Immediate execution figures
| Field | Type | Description | Example | |
|---|---|---|---|---|
sweep_price |
number | Price reached sweeping the book, half of each level assumed available | ||
slippage_pct |
number | |||
percent_of_24h_volume |
number |
PreTradeImpact#
Participation and impact tier at the requested duration
| Field | Type | Description | Example | |
|---|---|---|---|---|
tier |
enum | Null when no duration was given — LOW, MEDIUM, HIGH |
||
duration_seconds |
integer | |||
volume_participation_pct |
number | Percent of the median 5-minute volume | ||
order_book_participation_pct |
number | Percent of the book depth within 20 bps, per minute | ||
book_safe |
boolean | The book depth can absorb the flow | ||
model |
PreTradeImpactModel | required | Participation at a reference duration; pct(D) = pct × reference_duration_seconds / D. Volume participation above medium_pct is MEDIUM and above high_pct is HIGH, with the low order book thresholds while the order book participation is below low_order_book_participation_pct | |
model.reference_duration_seconds |
integer | required | ||
model.volume_participation_pct |
number | |||
model.order_book_participation_pct |
number | |||
model.low_order_book_participation_pct |
number | required | ||
model.thresholds_low_order_book |
PreTradeThresholds | required | ||
model.thresholds_high_order_book |
PreTradeThresholds | required |
PreTradeImpactModel#
Participation at a reference duration; pct(D) = pct × reference_duration_seconds / D. Volume participation above medium_pct is MEDIUM and above high_pct is HIGH, with the low order book thresholds while the order book participation is below low_order_book_participation_pct
| Field | Type | Description | Example | |
|---|---|---|---|---|
reference_duration_seconds |
integer | required | ||
volume_participation_pct |
number | |||
order_book_participation_pct |
number | |||
low_order_book_participation_pct |
number | required | ||
thresholds_low_order_book |
PreTradeThresholds | required | ||
thresholds_low_order_book.medium_pct |
number | required | ||
thresholds_low_order_book.high_pct |
number | required | ||
thresholds_high_order_book |
PreTradeThresholds | required | ||
thresholds_high_order_book.medium_pct |
number | required | ||
thresholds_high_order_book.high_pct |
number | required |
PreTradeMarket#
Market figures of the symbol
| Field | Type | Description | Example | |
|---|---|---|---|---|
last |
number | |||
best_bid |
number | |||
best_ask |
number | |||
mark_price |
number | |||
funding_rate |
number | Current funding rate (fraction), perpetuals only | ||
open_interest |
number | |||
high_24h |
number | |||
low_24h |
number | |||
base_volume_24h |
number | |||
quote_volume_24h |
number | |||
volatility_short |
number | Per-minute std of log returns, 1m candles over 5 h | ||
volatility_long |
number | Per-minute std of log returns, 1h candles over 3 d | ||
volatility_daily |
number | 1h log-return stdev scaled to 1 day (×√24) | ||
median_volume_5m |
number | Median volume of the last 100 5-minute candles | ||
volume_timeframe_min |
number | |||
contract_size |
number | Base units per contract when volumes and depths are in contracts (e.g. OKX); null when they are in base units | ||
min_quantity |
number | |||
quantity_precision |
integer | |||
book_levels |
integer | Order book levels used | ||
book_source |
string | Order book the analysis used: memory (full exchange depth) or redis (top 10 levels only) |
PreTradePov#
POV model. At a participation p the order trades k = p / (1 - 2p) of everyone else's volume, because the engine counts its own fills. The impact tier depends on p alone: pace_vs_market_pct above medium_pct is MEDIUM, above high_pct is HIGH, whatever the book depth. The quantity only sets the time to fill.
| Field | Type | Description | Example | |
|---|---|---|---|---|
pov_ratio_pct |
number | required | Requested participation, percent of market volume | |
pace_vs_market_pct |
number | required | Order flow as a share of the rest of the market (k) | |
share_of_total_pct |
number | required | Order flow as a share of all market volume, own fills included | |
estimated_fill_seconds |
integer | Time to fill the quantity if market volume stays at its recent median 5-minute volume. An estimate only: POV speeds up when volume rises and slows down when it falls; passive and hybrid styles, or a limit price, can be slower | ||
estimated_fill_seconds_24h |
integer | Same at the 24h average volume | ||
thresholds |
PreTradeThresholds | required | ||
thresholds.medium_pct |
number | required | ||
thresholds.high_pct |
number | required | ||
safe_pov_pct |
number | Largest ladder participation rated LOW | ||
moderate_pov_pct |
number | Largest ladder participation rated MEDIUM or better | ||
high_pov_pct |
number | Smallest ladder participation rated HIGH |
PreTradeThresholds#
| Field | Type | Description | Example | |
|---|---|---|---|---|
medium_pct |
number | required | ||
high_pct |
number | required |
Side#
The side of the book to trade.
Values: BUY, SELL
StrategyCampaign#
A PAPER-farm bot campaign
| Field | Type | Description | Example | |
|---|---|---|---|---|
id |
string | Campaign id (UUID) | ||
type |
string | Campaign type; today always paper_farm | ||
status |
enum | running | paused | stopped | done | error — running, paused, stopped, done, error |
||
stopping |
boolean | A graceful stop or a hard kill is under way. Independent of status: can be true while status stays error (the open legs are being closed before the campaign reaches stopped) | ||
phase |
string | Cycle phase the runner is in: idle, opening, open, closing or settling | ||
stop_reason |
string | Why a stopped/done campaign ended: cycles_done, budget_spent, session_key_expiring, queued_share, user_stop or user_kill. Empty while still running | ||
cycles_done |
integer | Cycles completed so far | ||
cycles_planned |
integer | max_cycles from create, or null for unlimited | ||
paper_minted |
number | Total PAPER minted by this campaign's losing legs | ||
usdc_converted |
number | Total USDC spent converting minted PAPER (haircut + fee) | ||
queued_usdc |
number | Profit queued to fund a future cycle's margin instead of being paid out | ||
haircut_paid |
number | Total haircut paid converting PAPER to USDC | ||
fees_paid |
number | Total trading fees paid by this campaign | ||
current_legs |
array[StrategyCampaignLeg] | Open legs of the current cycle (0 while idle, up to 2 while open) | ||
current_legs[].position_id |
string | The venue's position id, or null while the open is still unconfirmed | ||
current_legs[].side |
string | long or short | ||
current_legs[].entry |
number | Entry (mark) price the leg opened at | ||
current_legs[].move_pct |
number | Signed move since entry, in percent, from this leg's point of view | ||
current_legs[].bust |
number | This leg's liquidation (bust) price | ||
current_legs[].size |
number | Position size | ||
current_legs[].margin |
number | Margin posted for this leg, in USDC | ||
current_legs[].leverage |
integer | Leverage of this leg | ||
current_legs[].mark_price |
number | Latest mark price used to watch this leg | ||
current_legs[].parent_order_id |
string | The order id that opened this leg | ||
current_legs[].opened_at |
date-time | UTC time the leg opened, ISO 8601 | ||
last_cycle |
StrategyCampaignCycle | The campaign's most recently closed cycle | ||
last_cycle.pnl_usdc |
number | Net result of the cycle, in USDC (can be negative) | ||
last_cycle.paper |
number | PAPER minted by the losing leg of this cycle | ||
last_cycle.closed_at |
date-time | UTC time both legs were closed, ISO 8601 | ||
last_cycle.multileg_order_id |
string | The multileg (or paired single) order id the close went through, when known | ||
last_error |
string | Why the campaign is in error; empty otherwise | ||
symbol |
string | Anboto symbol being farmed, e.g. BTC/USDC:USDC | ||
leverage |
integer | Leverage of each leg | ||
margin_per_leg |
number | Margin posted per leg at the start of a cycle, in USDC | ||
target_move_bps |
integer | Winning-leg move, in basis points, that closes the cycle | ||
budget_usdc |
number | budget_usdc from create, or null for no spend cap | ||
stop |
StrategyStopRules | Stop conditions the campaign watches on its own, besides an explicit stop/kill | ||
stop.queued_share_pct |
number | Stop once this percent (0-100) of a new cycle's margin would come from queued profit rather than fresh budget. Null or omitted: off | ||
stop.stop_before_key_expiry |
boolean | Stop gracefully once the Papertrade session key has under an hour left, rather than risk a cycle stuck open past expiry | ||
stop.hard_kill_on_stop |
boolean | If a stop rule fires mid-cycle, close both legs at market now instead of waiting for the target | ||
created_at |
date-time | UTC time the campaign was created, ISO 8601 | ||
started_at |
date-time | UTC time the campaign started, ISO 8601 | ||
stopped_at |
date-time | UTC time the campaign stopped, ISO 8601, or null while still running |
StrategyCampaignActionRequest#
Names the campaign a pause/resume/stop/kill call acts on
| Field | Type | Description | Example | |
|---|---|---|---|---|
campaign_id |
string | required | The campaign's id (UUID) |
StrategyCampaignCycle#
The campaign's most recently closed cycle
| Field | Type | Description | Example | |
|---|---|---|---|---|
pnl_usdc |
number | Net result of the cycle, in USDC (can be negative) | ||
paper |
number | PAPER minted by the losing leg of this cycle | ||
closed_at |
date-time | UTC time both legs were closed, ISO 8601 | ||
multileg_order_id |
string | The multileg (or paired single) order id the close went through, when known |
StrategyCampaignLeg#
One leg (long or short) of the campaign's open or just-closed cycle
| Field | Type | Description | Example | |
|---|---|---|---|---|
position_id |
string | The venue's position id, or null while the open is still unconfirmed | ||
side |
string | long or short | ||
entry |
number | Entry (mark) price the leg opened at | ||
move_pct |
number | Signed move since entry, in percent, from this leg's point of view | ||
bust |
number | This leg's liquidation (bust) price | ||
size |
number | Position size | ||
margin |
number | Margin posted for this leg, in USDC | ||
leverage |
integer | Leverage of this leg | ||
mark_price |
number | Latest mark price used to watch this leg | ||
parent_order_id |
string | The order id that opened this leg | ||
opened_at |
date-time | UTC time the leg opened, ISO 8601 |
StrategyCampaignList#
A page of the team's campaigns
| Field | Type | Description | Example | |
|---|---|---|---|---|
count |
integer | Total campaigns matching the filter, across every page | ||
campaigns |
array[StrategyCampaign] | required | This page's campaigns, newest first | |
campaigns[].id |
string | Campaign id (UUID) | ||
campaigns[].type |
string | Campaign type; today always paper_farm | ||
campaigns[].status |
enum | running | paused | stopped | done | error — running, paused, stopped, done, error |
||
campaigns[].stopping |
boolean | A graceful stop or a hard kill is under way. Independent of status: can be true while status stays error (the open legs are being closed before the campaign reaches stopped) | ||
campaigns[].phase |
string | Cycle phase the runner is in: idle, opening, open, closing or settling | ||
campaigns[].stop_reason |
string | Why a stopped/done campaign ended: cycles_done, budget_spent, session_key_expiring, queued_share, user_stop or user_kill. Empty while still running | ||
campaigns[].cycles_done |
integer | Cycles completed so far | ||
campaigns[].cycles_planned |
integer | max_cycles from create, or null for unlimited | ||
campaigns[].paper_minted |
number | Total PAPER minted by this campaign's losing legs | ||
campaigns[].usdc_converted |
number | Total USDC spent converting minted PAPER (haircut + fee) | ||
campaigns[].queued_usdc |
number | Profit queued to fund a future cycle's margin instead of being paid out | ||
campaigns[].haircut_paid |
number | Total haircut paid converting PAPER to USDC | ||
campaigns[].fees_paid |
number | Total trading fees paid by this campaign | ||
campaigns[].current_legs |
array[StrategyCampaignLeg] | Open legs of the current cycle (0 while idle, up to 2 while open) | ||
campaigns[].last_cycle |
StrategyCampaignCycle | The campaign's most recently closed cycle | ||
campaigns[].last_error |
string | Why the campaign is in error; empty otherwise | ||
campaigns[].symbol |
string | Anboto symbol being farmed, e.g. BTC/USDC:USDC | ||
campaigns[].leverage |
integer | Leverage of each leg | ||
campaigns[].margin_per_leg |
number | Margin posted per leg at the start of a cycle, in USDC | ||
campaigns[].target_move_bps |
integer | Winning-leg move, in basis points, that closes the cycle | ||
campaigns[].budget_usdc |
number | budget_usdc from create, or null for no spend cap | ||
campaigns[].stop |
StrategyStopRules | Stop conditions the campaign watches on its own, besides an explicit stop/kill | ||
campaigns[].created_at |
date-time | UTC time the campaign was created, ISO 8601 | ||
campaigns[].started_at |
date-time | UTC time the campaign started, ISO 8601 | ||
campaigns[].stopped_at |
date-time | UTC time the campaign stopped, ISO 8601, or null while still running |
StrategyStopRules#
Stop conditions the campaign watches on its own, besides an explicit stop/kill
| Field | Type | Description | Example | |
|---|---|---|---|---|
queued_share_pct |
number | Stop once this percent (0-100) of a new cycle's margin would come from queued profit rather than fresh budget. Null or omitted: off | ||
stop_before_key_expiry |
boolean | Stop gracefully once the Papertrade session key has under an hour left, rather than risk a cycle stuck open past expiry | ||
hard_kill_on_stop |
boolean | If a stop rule fires mid-cycle, close both legs at market now instead of waiting for the target |
TradeDetails#
A fill of a child order, attached to its parent order
| Field | Type | Description | Example | |
|---|---|---|---|---|
trade_id |
string | The trade id assigned by the exchange, or the Anboto platform trade id when no exchange trade id was captured | 1204004183 |
|
symbol |
string | required | The symbol of the fill in Anboto's symbology | BTC/USDT:USDT |
exchange_order_id |
string | The exchange order id of the child order the fill belongs to | 151990408 |
|
client_order_id |
string | The client order id of the child order the fill belongs to | ||
quantity |
number | required | The absolute amount filled by this trade, in base asset | 0.5 |
price |
number | required | The traded price | 92.91 |
direction |
enum | The direction of the trade — BUY, SELL |
BUY |
|
maker_or_taker |
enum | Whether the fill was made as maker or taker — MAKER, TAKER |
MAKER |
|
exec_time |
integer | The execution time of the trade as ms since epoch | 1758276000000 |
|
fee |
number | The fee charged on the trade, in fee_currency | 0.0021 |
|
fee_currency |
string | The asset the fee was charged in | USDT |
|
parent_order_id |
integer | The Anboto id of the parent order the fill belongs to (the order_id of the enclosing order) | 596990285759373312 |
|
child_order_id |
integer | The Anboto id of the child (slice) order that executed on the exchange; the WebSocket trade topic carries it as order_id | 596990290020118528 |
TradeDetailsList#
| Field | Type | Description | Example | |
|---|---|---|---|---|
trades |
array[TradeDetails] | required | The list of trade details | |
trades[].trade_id |
string | The trade id assigned by the exchange, or the Anboto platform trade id when no exchange trade id was captured | 1204004183 |
|
trades[].symbol |
string | required | The symbol of the fill in Anboto's symbology | BTC/USDT:USDT |
trades[].exchange_order_id |
string | The exchange order id of the child order the fill belongs to | 151990408 |
|
trades[].client_order_id |
string | The client order id of the child order the fill belongs to | ||
trades[].quantity |
number | required | The absolute amount filled by this trade, in base asset | 0.5 |
trades[].price |
number | required | The traded price | 92.91 |
trades[].direction |
enum | The direction of the trade — BUY, SELL |
BUY |
|
trades[].maker_or_taker |
enum | Whether the fill was made as maker or taker — MAKER, TAKER |
MAKER |
|
trades[].exec_time |
integer | The execution time of the trade as ms since epoch | 1758276000000 |
|
trades[].fee |
number | The fee charged on the trade, in fee_currency | 0.0021 |
|
trades[].fee_currency |
string | The asset the fee was charged in | USDT |
|
trades[].parent_order_id |
integer | The Anboto id of the parent order the fill belongs to (the order_id of the enclosing order) | 596990285759373312 |
|
trades[].child_order_id |
integer | The Anboto id of the child (slice) order that executed on the exchange; the WebSocket trade topic carries it as order_id | 596990290020118528 |
TradingExchange#
The exchanges available for order placement via the API
Values: BINANCE, HUOBI, GATEIO, KRAKEN, KUCOIN, OKX, BYBIT, BITGET, WOO, MEXC, BULLISH, B2C2, COINBASE_PRIME, COINBASE_INTL, HYPERLIQUID, LIGHTER, PAPERTRADE
TradingStyle#
The trading style of the order, the default is HYBRID
Values: PASSIVE, AGGRESSIVE, HYBRID
TriggerCondition#
The trigger condition to start the order
Values: ABOVE, BELOW
TriggerInfo#
Information related to how the order should be triggered.
| Field | Type | Description | Example | |
|---|---|---|---|---|
trigger_price |
string | required | The price to monitor for the trigger | |
trigger_condition |
enum | required | The trigger condition to start the order — ABOVE, BELOW |
Urgency#
The Urgency or Risk Aversion of the IS strategy, the default is MEDIUM. The parameter is not case-sensitive. Each risk aversion levels correspond to a lambda value, "that is, how much we penalize variance relative to expected cost" Low : 0.2e-6 Medium: 1e-6 High: 5e-6 Based on the paper from Almgren Chriss https://www.smallake.kr/wp-content/uploads/2016/03/optliq.pdf
Values: LOW, MEDIUM, HIGH
WouldInfo#
Information to instruct how to execute a Would price trigger.
| Field | Type | Description | Example | |
|---|---|---|---|---|
would_price |
string | The price to trigger Would mode | ||
would_pct |
string | required | The percent of the order to trade when the Would price triggers | |
would_style |
enum | required | The trading style of the order, the default is HYBRID — PASSIVE, AGGRESSIVE, HYBRID |
|
would_is_arrival |
boolean | Would price as arrival price | ||
would_bps |
string | Bps better than the would reference (arrival or would_price) before would children trigger. Default: 1 with would_is_arrival, 0 with would_price | 5 |