Skip to main content
Authoritative request/response shapes live in the OpenAPI spec the bot ships with (docs/swagger.json in the repo, generated with make swagger). Prefer generating a typed client from that spec. The interactive reference is also in this guide under ADDONS → API.

Endpoint map (/api/v1)

One-shot trade

  • Required: wallet_id, input, direction, amount.
  • direction is buy or sell. Any other value silently becomes buy — validate it yourself.
  • chain: solana (default when empty/invalid), evm, robinhood. input is validated per chain (Solana base58 pubkey; EVM hex address).
  • preset / strategy reference saved ids; fee, tip, slippage are per-call overrides.
  • EVM / Robinhood wallets must be upgraded first: POST /wallets/{id}/upgrade.
  • Response includes task_id and, when finished, result (transaction_id, slot, pool_id, pool_platform, token_in / token_out info, amounts, market_cap_usd).
Exact semantics of amount and stable (which token, what units) are not fully spelled out in the OpenAPI spec. Test with a tiny amount — or confirm with the user — before scaling up. For asset tickers and empty-stable behavior, see Assets.

Polymarket trade

POST /polymarket/trade with: Also: GET /polymarket/{wallet_id}/positions.

Task groups (long-running automation)

Modules: solswap, evmswap, polymarket, dtf, solmm. Solswap modes include default, copy-trade, afk, limit, snipe, feed, and bb.
  1. POST /tasks/ once to register task modules after init.
  2. PUT /tasks/ to create a group:
    data is an array of task models for that module. Shape depends on the module — copy an existing group from GET /tasks/, or read models.Task / models.<Module>Metadata in the OpenAPI spec.
  3. POST /tasks/{group_id} to start, PUT /tasks/{group_id} to stop. POST /tasks/idle starts all idle groups.
  4. Change a running setup with PATCH /tasks/{group_id}/{task_id} rather than deleting and recreating.
Task settings are large. Prefer creating a preset (POST /presets/ in the GUI or via API) and referencing it instead of hand-writing every field. GET /presets/comments and GET /config/comments return field-by-field documentation — use those to explain settings instead of guessing. Related guide pages: Presets (CLI), Presets (GUI), Strategies, Tasks (CLI).

Feed mode (bring your own signal)

feed mode tasks fire when you push a Solana transaction. Use this to trigger buys from your own detector. Task field reference: Feed.
  • transaction is a base64 Solana transaction and is the only required field. With no ctx, all running feed tasks see it.
  • With ctx, group_id is required. task_id: -1 targets all tasks in the group; amount / fee / tip / slippage override per call.
  • Leave no_account_set_on_create_pool unset unless BLOOD maintainers tell you to set it.
  • Working reference clients ship in the repo at examples/feed/go and examples/feed/rust.