For the complete documentation index, see llms.txt. This page is also available as Markdown.

Flash Trade V2 API

Build on the Flash Trade v2 perpetuals engine — REST + WebSocket.

The Flash Trade v2 API is a REST + WebSocket interface to the Flash perpetuals engine — near-instant, gasless trade execution on Solana. Build trading UIs, bots, and integrations without running your own indexer or transaction builder.

Base URL: https://flashapi.trade

There's no API key. You read data over plain HTTP and build transactions server-side; every transaction comes back unsigned, and you sign and submit it from the client. See Signing & submitting.

Start here

If you want to…
Go to

See it work end-to-end

Understand how it works before you build

Do one specific task

Look up an exact endpoint, field, or type

Handle an error

What you can build

  • Trade — open, close, increase, decrease, and reverse leveraged positions; market and limit orders.

  • Manage risk — attach take-profit / stop-loss, add or remove collateral.

  • Move funds — deposit, delegate, and withdraw through the funds lifecycle.

  • Read state — prices, markets, pool stats, and a wallet's live positions & orders.

  • Stream — subscribe to a wallet's basket snapshot over WebSocket.

  • Preview — compute fees, exit fees, TP/SL PnL, and margin changes without building a transaction.

How it works in 60 seconds

  • One account per wallet. All of a wallet's positions and orders live in a single per-owner Basket — one position per market. You identify a position by (owner, marketSymbol, side); the backend resolves the rest. → The Basket model

  • Funds lifecycle. Collateral moves through deposit → delegate → trade → withdraw. → Funds lifecycle

  • Two submit targets. Account & funds transactions go to your Solana RPC; trading transactions go to the v2 RPC endpoint. → Signing & submitting

Endpoint map

Group
Endpoints
Reference

Market data

health, tokens, prices, pool-data, raw/*

Account & positions

owner/{owner}, positions/owner/{owner}, orders/owner/{owner}

Previews

preview/limit-order-fees, preview/exit-fee, preview/tp-sl, preview/margin

Trading

open/close/increase/decrease/reverse, collateral, triggers, limits

Account & funds

init-*, deposit, delegate-basket, withdraw, settlement

Streaming

owner/{owner}/ws

Program IDs

Network
Program

Mainnet

FLASH6Lo6h3iasJKWDs2F8TkW2UKf3s15C8PMGuVfgBn

Devnet

FTPP4jEWW1n8s2FEccwVfS9KCPjpndaswg7Nkkuz4ER4

Last updated

Was this helpful?