API Reference v1
Get API Key API Key

Direct manual trading

Direct manual trading is available in Production on Solana, BSC and Robinhood. Existing Copy Trading and Sniper APIs are unchanged.

Manual trading supports solana, bsc, and robinhood. It executes against an already tradable token; it does not wait for a launch. Create an API Key with orders:read and the specific permissions you need: orders:buy, orders:sell, orders:cancel. Each write permission requires read. These permissions are not granted to existing keys automatically or exposed through MCP.

Accounts created on or after November 3, 2026 at 00 UTC must contact support for API access approval before creating any API key or approving an MCP OAuth client; older accounts and rotation of existing keys are unaffected.

Read access covers your account’s orders, including orders created from other APM clients. Cancel access covers any untriggered pending order in your account: manual limits, take profit and stop loss, trailing and break-even stops, segmented take profit, Flash Sell and task exit orders, including those created with another key or client; a triggered or submitted order returns 409 ORDER_NOT_CANCELLABLE. Take care not to cancel protection orders when cancelling in bulk from the order list. A revoked key or expired token does not cancel an accepted order.

Exchange and connect

Send your API Key only to the central API:

curl --fail-with-body https://api.apm.fun/v1/cell-token \
  -H "Authorization: Bearer $APM_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"chain":"solana"}'

The data response contains token, expires_at, cell_id, gateway_url and scopes. Use the returned gateway and JWT for all operations below. Keep a separate token for each chain; never send the API Key to a Cell. Tokens last at most 60 seconds and never outlive the parent key. Refresh before expiry, for example after 40 seconds, and use expires_at when the parent key expires sooner. Revocation, rotation and policy changes stop new issuance; an existing JWT can remain usable until its expiry.

Store both credentials securely on your server. Use an Authorization: Bearer header, never a URL parameter. IP allowlists apply to both exchange and Cell requests; an empty list means unrestricted source IPs.

Operations and amounts

All paths below are relative to the returned gateway_url, not the central API base URL.

OperationPathScope
Market or limit buyPOST /v1/orders/place, side=buyorders:buy
Market or limit sellSame path, side=sellorders:sell
Cancel an untriggered pending orderPOST /v1/orders/{order_id}/cancelorders:cancel
Current order stateGET /v1/orders/{order_id}/statusorders:read
Live account order eventsGET /v1/orders/streamorders:read

Choose a wallet from GET /v1/wallets, then pass its address as wallet, not its wallet ID. Submit one wallet per request. token is a Solana mint or an EVM token address.

ChainBuy amountpriority_feeOther fee controls
SolanaSOLSOLlanding_fee and anti_mev supported
BSCBNBGweilanding_fee and anti_mev supported
RobinhoodETHAutomaticGas is automatic; landing_fee, anti_mev, priority_fee and auto_gas=false are ignored

For every chain, sell amount is a percentage in (0,100], not a token quantity. Sell percentages apply to the wallet’s full current balance, not net of other sells of the token in flight; limit sells use the balance at execution time. On EVM the amount is capped to what is unreserved, so a second 50% sell while the first is in flight sells everything left. A zero balance ends with ZERO_TOKEN_BALANCE. Use decimal strings for amounts and fees. Set slippage_bps explicitly (0–9999); omission means zero, not your saved Web preference. Do not reuse the Copy Trading fee defaults for these manual operations.

Example request body, with deliberately illustrative addresses and amounts:

{
  "request_id": "a-unique-id-for-this-intent",
  "chain": "solana",
  "wallet": "<owned wallet address>",
  "token": "<mint address>",
  "side": "buy",
  "kind": "market",
  "amount": "0.01",
  "slippage_bps": 100,
  "priority_fee": "0.00001"
}

For a limit order set kind=limit, a positive trigger_price_usd, and trigger_direction=above|below. Optional expires_at_ms must be in the future and no more than seven days away; the default is 72 hours. A condition already satisfied can trigger immediately. Limit orders execute a market trade when triggered; the trigger price is not a guaranteed fill price. Convert market-cap or percentage targets to a USD token price before submitting.

pool applies only to market orders without task_id. Task-linked market sells use the existing task ownership, wallet and routing checks; they cannot be combined with a pool override or limit order. On Robinhood, gas is automatic: landing_fee, anti_mev, priority_fee and auto_gas=false are ignored, not rejected.

Skip tokens you already bought

Set already_bought_check=true on a market buy to keep one claim per account, wallet and token on the gateway. The first such buy of a token is accepted and takes the claim in the same step, so simultaneous requests for one token admit exactly one. Later ones return 409 ALREADY_BOUGHT with the holding order’s order_id, are not delivered, and their request_id stays unused. The state lives on the gateway, so it survives restarting your bot or moving it to another server.

  • Only buys sent with the flag read or take claims. Buys without it, on Web or Telegram, or by copy trading are not counted.
  • A claim is released when its order is seen to have failed or been rejected, so the next signal can retry. A timed-out order keeps the claim, because its transaction may still land. If the order’s status has already expired from the 24-hour live window, or the outcome is unknown, the claim is kept; send the buy without the flag to force it. Claims expire 180 days after they were last taken.
  • Retrying the same request_id returns the original order and is not refused.
  • The flag is rejected on sells and limit orders.
  • The Solana, BSC and Robinhood gateways all apply this check.

Solana fees and landing channels

priority_fee is the priority-fee budget and landing_fee is the tip, both in SOL. For a manual buy or sell, read the tiers using landing_fee alone. An omitted tip counts as zero.

Tip in SOLOrdinary orderanti_mev=true
Below 0.000001No acceleration routesOrder ends before sending with status=failed, error_code=LANDING_FEE_TOO_LOW
0.000001 to below 0.0001No acceleration routesVery few protected routes
0.0001 to below 0.001Some acceleration routesSome protected routes
0.001 or moreAll acceleration routesAll protected routes

Ordinary orders can still be sent without acceleration. Anti-MEV fills are slower than normal mode. At the lowest eligible tips, a protected order past your slippage is dropped and shows as not filled, still with a small on-chain fee. Raise the tip, widen slippage or turn off Anti-MEV.

The tip is paid at most once. The copies sent through different channels share one durable nonce, so at most one executes. In tx_hashes, each hash identifies a copy that was sent. After a fill, the successful hash identifies your trade. The other copies will not appear on chain.

Balance. A buy needs the wallet balance to cover the amount, the 1% platform fee, the wallet’s other orders in flight and their fees, plus a minimum remaining balance: 0.01 SOL on Solana, 0.005 BNB on BSC, 0.001 ETH on Robinhood. On every chain a shortfall fails the order before execution with status=failed and error_code=INSUFFICIENT_BALANCE, and no funds are used. On Solana the error_message gives the figures in lamports (native, in flight, principal, reserve); EVM uses wei. For example, a 0.01 SOL buy needs at least a 0.01 SOL reserve on top of it, plus the platform fee and any orders in flight. A failed order stays bound to its request_id for 24 hours, so after topping up the wallet, submit the order again with a new request_id.

Pool liquidity. When the order’s pool cannot fill the amount (simulated, the swap runs the pool out of liquidity; a Whirlpool, for example, can cross at most three tick arrays in one swap) and, for a sell, no other pool of the token can take it, the order is not sent: it ends with status=failed and error_code=POOL_RESERVE_INSUFFICIENT, and no funds are used. The error_message names the pool and the simulation’s error. A smaller amount may fill.

Recover results without duplicate trades

Acceptance is not a confirmed fill. Save order_id and query status; a successful trade requires status=landed and terminal_status=filled. DELIVERY_OUTCOME_UNKNOWN can return an order_id; query it rather than create a new intent. Cancellation can race with execution, so query the final state after an uncertain cancellation.

Keep the same request_id and unchanged business parameters when recovering the same intent, even after token refresh or key rotation. Within one account this recovers the existing binding; do not create a new ID after a network timeout. Market bindings last 24 hours; limit bindings last at least until expiry plus 24 hours. Beyond that window use the known order ID, not a new placement. Changing a fee does not guarantee replacement of an already accepted transaction.

Use an SSE client supporting the Authorization header. The API token’s stream closes at expiry. Establish a new stream with a fresh token, then query your tracked nonterminal order IDs and merge events by their timestamps/state. There is no replay or exactly-once delivery guarantee. Each account can hold at most 8 API streams per Cell, within a 32-connection limit per account per Cell shared with Web clients. Close streams you no longer need; opening more returns 429 TOO_MANY_STREAMS.

Each account has two quota buckets per Cell: reads (status and stream) and orders (place and cancel). Each bucket is initially 10 requests/second and 600/minute. Quotas follow the account, so token refresh or key rotation does not reset them, and status polling cannot consume the order bucket. Cell gateway 429s (RATE_LIMITED, TOO_MANY_STREAMS) carry no Retry-After; wait at least one second before retrying. 403 indicates a scope or IP denial; refreshing cannot add missing permission. A 403 from /v1/cell-token can also mean the chain’s Cell API access is not enabled yet, or the key’s saved IP allowlist contains an invalid entry; fix the IP policy in the API Key settings. An unknown delivery result still requires status recovery.

Latency and client setup

These apply to every chain.

  • Reuse connections. Keep HTTP connections open (a connection pool or keep-alive) instead of opening one per request. A new connection adds TCP and TLS round trips, which can cost a second or more when the client is far from the gateway.
  • Refresh the token ahead of time, in the background, rather than right before an order.
  • Watch GET /v1/orders/stream instead of polling status. Open the stream before you place the order. Status changes arrive as they happen, one round trip earlier than a poll can see them. The stream sends a : ping comment line about every 15 seconds and closes when the token expires.
  • Run close to the Cell. The gateways are in Frankfurt (Solana), Tokyo (BSC) and Ohio (Robinhood).
  • Set your own User-Agent. Solana requests pass through Cloudflare, which rejects the default User-Agent of some libraries, for example Python’s urllib, with 403 before the request reaches the gateway. The defaults of requests, Go, Node.js, Java and okhttp are accepted.

Dedicated entry on request (Solana)

For trading servers in or near Frankfurt, we can set up a private entry reserved for your server. Your requests skip the public Cloudflare edge and reach the Solana Cell over a direct, mutually authenticated connection, which lowers per-request latency and makes it more consistent. Measured from Frankfurt on kept-alive connections, the median round trip drops from about 7 ms to under 2 ms, and the 90th percentile from about 20 ms to under 2 ms.

  • What you need: a trading server with a fixed public IPv4 address, a client certificate that you generate yourself (the private key never leaves your server), and a client that reuses connections. A new connection to the dedicated entry is not faster.
  • What stays the same: your API Key and Cell token, the paths and request bodies on this page, quotas and every permission and ownership check. It does not give orders execution priority; landing still depends on your fees and network conditions. The public route stays available as a fallback, using the same request_id rules.
  • Where it helps: the gain comes from removing the edge hop, so it is largest close to Frankfurt and small far away from it. Solana only for now.
  • How to apply: contact support with where your server is hosted and your expected request rate.