Setryn

Developers

API 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
Issued API keys with scopes, usage and rate-limit headroom
KeyScopesStatusRequestsRate limitLast usedActions
Loading keys from the local key service…

Integration log

Most recent requests made with the selected key
WhenRequestStatusLatency
Select a key to see its requests.
Version 1 endpoints under /api/v1 with the scope each needs
EndpointScopeReturns
GET/api/v1/statusreadChain, head block, code-hash evidence
GET/api/v1/marketsreadListed markets with live quotes and range-forward terms
GET/api/v1/markets/{id}readSeries, book, price grid, lot cap and collateral per lot
GET/api/v1/markets/{id}/bookreadThe market's own onchain book, or labelled reference depth
GET/api/v1/markets/{id}/tradesreadThe market's direct-book fills, newest first
GET/api/v1/accounts/{accountId}readPosted, reserved and available collateral
GET/api/v1/accounts/{accountId}/positionsreadLive positions
GET/api/v1/ordersreadBy accountId or signer; filter by state
GET/api/v1/orders/{orderHash}readOne registered order
GET/api/v1/fillsreadAccount fills with fees and outcome
GET/api/v1/receiptsreadExecution receipts
POST/api/v1/orders/preparetradeUnsigned order + EIP-712 typed data
POST/api/v1/orderstradeRelay a signed order; returns transactions
POST/api/v1/orders/{orderHash}/canceltradeCancel transactions + risk-release message
POST/api/v1/positions/exit/preparetradeFull exit of an offsetting pair, typed data
POST/api/v1/positions/exittradeRelay a signed exit; returns transactions
GET/api/v1/rfqsreadPrivate RFQs by accountId or signer
GET/api/v1/rfqs/{rfqId}readOne RFQ with its quotes and fills
GET/api/v1/rfqs/{rfqId}/quotesreadQuotes, best price first, with withinLimit
POST/api/v1/rfqs/preparetradeUnsigned RFQ order + request typed data
POST/api/v1/rfqstradeRelay a signed RFQ; returns transactions
POST/api/v1/rfqs/{rfqId}/quotestradeInvite solvers to quote a collecting RFQ
POST/api/v1/rfqs/{rfqId}/accept/preparetradeUnsigned quote selection typed data
POST/api/v1/rfqs/{rfqId}/accepttradeRelay a signed selection; returns transactions
POST/api/v1/rfqs/{rfqId}/settletradeExecutor clears the submitted RFQ atomically
POST/api/v1/rfqs/{rfqId}/canceltradeCancel an unselected RFQ + risk release

Create API key

Scopes
Rate limit
The secret is shown once. Setryn stores only its hash.
# 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