Skip to main content

Examples

These examples show the current 0.1.3 private-beta integration shape. Market makers should begin with the Market Maker Beta Quickstart.

TypeScript Public Reads

import { SenticoreClient } from "@sentico-labs/sdk";

const client = new SenticoreClient({
publicHttpBaseUrl: "https://api.sentico-labs.xyz",
tradingHttpBaseUrl: "https://api.sentico-labs.xyz",
publicWsUrl: "wss://api.sentico-labs.xyz/api/v1/ws/public",
privateWsUrl: "wss://api.sentico-labs.xyz/api/v1/ws/private/{account}",
});

const markets = await client.public.listMarkets();
const snapshot = await client.public.getMarketSnapshot(1);

BSL Compact Submit

await client.orderEntry.submitActions([signedAction], {
idempotencyKey: "quote-refresh-1",
resultMode: "ack",
responseMode: "detailed",
orderEntryApiKey: process.env.SENTICORE_ORDER_ENTRY_API_KEY,
});

This submits compact JSON bytes to:

POST /api/order-entry/binary
Content-Type: application/x-senticore-order-entry-batch
X-BSL-Result-Mode: ack
X-Senticore-Response-Mode: detailed

Wallet or delegated signatures inside the action batch are still required. The optional order-entry key only authorizes a dedicated lane and rate tier.

Python Public Reads

from senticore import SenticoreClient, SenticoreConfig

client = SenticoreClient(
SenticoreConfig(
public_http_base_url="https://api.sentico-labs.xyz",
trading_http_base_url="https://api.sentico-labs.xyz",
)
)

markets = client.public.list_markets()
print(markets.data)
client.close()

Integration Checklist

  • Use the tested beta route bundle before switching to canonical BSL aliases.
  • Use Idempotency-Key for every retriable mutation.
  • Persist nonce, idempotency key, derived order id, and client order id.
  • Handle 429 with bounded backoff and jitter.
  • Treat SHARD_BUSY, QUEUE_LIMIT, RISK_CREDIT_LIMIT, KILL_SWITCH, and MARKET_HALTED as strategy-level events.
  • Keep owner wallet keys out of bots and quote engines.
  • Run node scripts/e2e/mm-docs-contract-audit.cjs against the target account.