Developers
API keys, SDK, delegated signers, webhooks, and integration logsAPI v1Console
Active keys
–
0 issued
Requests
–
all keys
Errors
–
4xx and 5xx
Rate limited
–
429 responses
Replay rejected
–
nonce, clock, signature
API keys
0 active
| Key | Scopes | Status | Requests | Rate limit | Last used | Actions |
|---|---|---|---|---|---|---|
| Loading keys from the local key service… | ||||||
Integration log
| When | Request | Status | Latency |
|---|---|---|---|
| Select a key to see its requests. | |||
Endpoints
| Endpoint | Scope | Returns |
|---|---|---|
| GET/api/v1/status | read | Chain, head block, code-hash evidence |
| GET/api/v1/markets | read | Listed markets with live quotes and range-forward terms |
| GET/api/v1/markets/{id} | read | Series, book, price grid, lot cap and collateral per lot |
| GET/api/v1/markets/{id}/book | read | The market's own onchain book, or labelled reference depth |
| GET/api/v1/markets/{id}/trades | read | The market's direct-book fills, newest first |
| GET/api/v1/accounts/{accountId} | read | Posted, reserved and available collateral |
| GET/api/v1/accounts/{accountId}/positions | read | Live positions |
| GET/api/v1/orders | read | By accountId or signer; filter by state |
| GET/api/v1/orders/{orderHash} | read | One registered order |
| GET/api/v1/fills | read | Account fills with fees and outcome |
| GET/api/v1/receipts | read | Execution receipts |
| POST/api/v1/orders/prepare | trade | Unsigned order + EIP-712 typed data |
| POST/api/v1/orders | trade | Relay a signed order; returns transactions |
| POST/api/v1/orders/{orderHash}/cancel | trade | Cancel transactions + risk-release message |
| POST/api/v1/positions/exit/prepare | trade | Full exit of an offsetting pair, typed data |
| POST/api/v1/positions/exit | trade | Relay a signed exit; returns transactions |
| GET/api/v1/rfqs | read | Private RFQs by accountId or signer |
| GET/api/v1/rfqs/{rfqId} | read | One RFQ with its quotes and fills |
| GET/api/v1/rfqs/{rfqId}/quotes | read | Quotes, best price first, with withinLimit |
| POST/api/v1/rfqs/prepare | trade | Unsigned RFQ order + request typed data |
| POST/api/v1/rfqs | trade | Relay a signed RFQ; returns transactions |
| POST/api/v1/rfqs/{rfqId}/quotes | trade | Invite solvers to quote a collecting RFQ |
| POST/api/v1/rfqs/{rfqId}/accept/prepare | trade | Unsigned quote selection typed data |
| POST/api/v1/rfqs/{rfqId}/accept | trade | Relay a signed selection; returns transactions |
| POST/api/v1/rfqs/{rfqId}/settle | trade | Executor clears the submitted RFQ atomically |
| POST/api/v1/rfqs/{rfqId}/cancel | trade | Cancel an unselected RFQ + risk release |
Create API key
# In this workspace
pnpm add @setryn/sdk --filter <your-package>
# Run the bundled examples against the local deployment
export SETRYN_API_KEY=stk_test_... # from "Create API key"
export SETRYN_BASE_URL=http://localhost:3100
pnpm --filter @setryn/sdk example:read@setryn/sdk is ESM with viem as its only dependency. Source and README: packages/sdk.
Authentication and limits
- Authentication
- Authorization: Bearer stk_test_<id>_<secret>. Scopes read and trade; optional signer allowlist.
- Rate limits
- Token bucket per key. RateLimit-Limit, -Remaining, -Reset and -Policy on every response; 429 with Retry-After.
- Replay protection
- Writes need Setryn-Timestamp (±60s), a single-use Setryn-Nonce, and Setryn-Signature.
- Signature
- hex HMAC-SHA256, key = SHA-256(apiKey), over SETRYN-HMAC-SHA256-V1, method, path?query, timestamp, nonce, SHA-256(body), newline-joined.
- Errors
- { error: { code, message } } with stable codes, plus Setryn-Request-Id for support.
- Versioning
- Major version in the path. Breaking changes ship as /api/v2 with at least 90 days of v1 overlap and Deprecation/Sunset headers.
Delegated signers
Not onchain yet
Orders are signed by the account owner. The collateral vault derives the account from the signer, and risk admission refuses an order whose signer does not own the account, so a separate session or bot key cannot trade an account today.
What is enforced now: an API key can be restricted to specific signer addresses, and the API never holds a private key. Every order is signed in your wallet, and every transaction is sent by it.
Onchain delegated signers with per-signer limits need a contract change and are not available in v1.
Webhooks
Push delivery of fills, order state and receipts to your endpoint is documented under the webhooks API.
/api/v1/webhooks