Skip to main content
A full, runnable spot bot. It creates a group to trade in, opens a token position with an opening buy, scales the position, and closes it. Every amount is USDC in and USDC out. Before you run it: create an API key and fund your wallet with USDC. See the Quickstart — funding is one step (send USDC on Solana to your wallet address).

The whole flow

Step by step

  1. Create a group (POST /groups) so you have somewhere to post calls. The caller becomes the group admin, which is what lets you open proposals.
  2. Find a token (GET /spot/tokens/search). Results are Jupiter’s shape; symbol is reliable, and you trade by the Solana mint.
  3. Open a proposal (POST /spot/proposals) with amountUsd of USDC to spend. This places the opening buy and returns the proposal.
  4. Buy and sell (/buy, /sell) to scale. On a buy, amountUsd is USDC spent; on a sell, it’s USDC received. Pass max: true on either to skip sizing math.
  5. Close (/close) sells your remaining position and ends the proposal.
max: true is your friend for clean exits: { "max": true } on /sell exits the whole position with no dust. See the Spot trading guide for every field and response shape.