Appearance
Get Started
The Blink API has two surfaces:
- Transactions (write): signed
RuntimeCalls submitted Borsh-encoded to the sequencer. Placing and cancelling orders, managing margin, and transferring funds are all transactions. - Read and streaming: a normalized REST and WebSocket API, served by the unified API gateway over indexer state and the sequencer feed.
Base URLs are deployment-specific.
Official SDKs
| Language | Package | Scope (v1) |
|---|---|---|
| Rust | blink-sdk | typed REST + WebSocket |
| TypeScript | blink-sdk | typed REST + WebSocket |
Both decode the API's integer exchange units safely (values beyond 2^53 arrive as decimal strings) and implement the WebSocket protocol with the documented reconnect semantics. Transaction signing uses @sovereign-sdk/web3 in TypeScript.
Submitting a transaction
Transactions use either the native Standard authenticator or the owner-wallet SolanaOffchain authenticator. See Signing Transactions for the two signing paths and their HTTP endpoints.
Runtime calls are grouped by module: Accounts, Spot, Perps, and Oracle. See the transaction reference for the module index.
Reading state
Market data and account state are served over REST and WebSocket by the API gateway. No authentication is required.
bash
# List markets
curl https://api-v1-ab.blink.trade/markets
# A subaccount's open positions
curl https://api-v1-ab.blink.trade/accounts/0x9b08…3e25/subaccounts/0/positionsReference: Markets & Orderbook · Trades · Accounts, Positions & Orders · Funding & Liquidations · Vaults & BLP · Tokens · System · Explorer.
Streaming
For real-time orderbook, trades, and account updates, connect to the WebSocket API and subscribe to channels.
Next steps
- Signing Transactions: authenticators and submission.
- Data Structures & Constants: units and scalar types.