Skip to main content
POST
Create a bot

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
exchanges
(enum<string> | string)[]
required

Venues the pair legs may be opened on: an exchange name for all of its markets, or hyperliquid:<dex> for one Hyperliquid dex (hyperliquid:hyperliquid for Hyperliquid's own perps, otherwise a HIP-3 dex: xyz, mkts or io); each leg of a pair is on a different one of these, and a bare hyperliquid counts as one

Minimum array length: 2

Supported perpetual exchange

Available options:
aster,
binance,
bybit,
extended,
gate,
hyperliquid,
lighter,
mexc,
ondo,
robinhood
Example:
leverage
integer
required

Leverage per leg, capped by each market limit

Required range: x <= 9007199254740991
Example:

2

maxRoundTripCostBps
number
required

Most a round trip (entry plus exit: fees, the hedge's book crossing and the resting leg's bid-ask spread) may cost, in basis points of the notional; pairs are ranked by expected funding over the hold minus this cost

Example:

25

notionalUsd
number
required

Notional per leg in USD at the full leverage; a pair trades about 5% under it, further under where a venue reserves fee and slippage beyond notionalUsd / leverage (a market leg on Extended, Lighter or Robinhood) or a market caps leverage lower

Example:

500

categories
enum<string>[]

Asset classes to trade; omit to trade every category

Minimum array length: 1

Asset class of the market

Available options:
commodities,
crypto,
etf-index,
forex,
pre-ipo,
stocks-asia,
stocks-us
maxHoldHours
number
default:24

Longest time to hold a pair before closing it even while the spread still pays; low for frequent rolls, high for carry

minExpectedNetBps
number

Least a pair must be expected to earn over the hold after its round trip, in basis points of the notional; omit to enter on the cost cap alone, as points farming does

Example:

20

requiredExchange

Venue one leg of every pair must be on, an exchange or one Hyperliquid dex as in exchanges; omit to let any two venues pair up

Available options:
aster,
binance,
bybit,
extended,
gate,
hyperliquid,
lighter,
mexc,
ondo,
robinhood
risk
enum<string>
default:low

How much history the bot wants of a pair: low — a spread positive for the last 12 hours that also paid over the last day, held until the day stops paying or the spread flips hard; medium — the same with 6 hours; high — a spread paying now is enough, held until it turns clearly negative

Available options:
low,
medium,
high

Response

config
BotConfig · object | null
required

Bot configuration, applied by the runner on its next poll; null when the stored configuration no longer matches the current schema and the bot must be recreated.

createdAt
string<date-time>
required

When the bot was created.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
id
string<uuid>
required

Bot identifier.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
lastError
string | null
required

What needs your attention, or null when nothing does: while the bot runs, a problem it keeps retrying or waits out, such as a venue key to reconnect, and once it halts, why it halted.

lastScan
BotScan · object | null
required

The last scan that opened nothing, with the pairs it ranked and why each was passed over; null while the bot has never scanned, entered on every scan, or its stored scan no longer matches the current schema.

openCycle
BotOpenCycle · object | null
required

The pair the bot is working on, or null while it holds none.

status
enum<string>
required

running — the bot executes scheduled ticks. stopping — the runner closes the pair it holds, if any, then stops. stopped — it has never been started, or you stopped it. halted — it hit a state it will not act on and stopped itself; lastError says which.

Available options:
halted,
running,
stopped,
stopping
updatedAt
string<date-time>
required

When the bot last changed.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$