ResoMarket/Docs/Trading API

Trading API v1

HTTP and WebSocket protocol for automated trading and market making across ADI Mainnet and Polygon. USDC / pUSD · EIP-712 · HMAC.

Protocol v1Wallet-nativeADI Mainnet · Chain 36900Polygon · Chain 137USDC / pUSDEIP-712 + HMAC
Download JavaScript API demov0.1.2 · SHA-256 1920806fdb8c... · Node 20crypto: Previewsports: Previewbtc-3m: Preview

Preview means the API and offline demo are available, but the current release ZIP has not completed per-product runtime and real-funds closed-loop acceptance. Validate with a controlled wallet and the minimum amount before production funding.

Orders require an owner-wallet signature. Only a signed-in session with a managed owner signer may have one order server-signed; L2 credentials cannot sign orders or withdraw funds.

Coverage

An external platform can integrate through the documented HTTP, EIP-712, HMAC, and WebSocket contracts without a Reso web session.

CapabilityAPI surfaceAuthentication
Wallet account and Reso CredentialAccount and Credential APIsOwner L1 then Reso L2
Markets, private portfolio, public profileThree product reads and wallet profilePublic or Reso L2
BTC 3m ordersFull order lifecycleReso L2 + owner EIP-712
ADI Sports IOCImmediate ordersReso L2 + ADI-native order signature
Polymarket Crypto FAKImmediate ordersReso L2 + CLOB Credential + owner order signature
Deposit intent and statusFunding intent and status APIsReso L2
Withdrawal to funding walletFunding intent and statusBound funding-wallet WITHDRAW challenge

End-to-end workflow

Use this order for a wallet-native integration. Every write is idempotent or one-time; preserve exact request bytes and identifiers until the final state is known.

Before you start

  • An EVM funding-wallet signer controlled by the caller; Reso never receives the private key and provisions a separate managed owner.
  • A secret store for the one-time Reso Credential and any Provider Credential.
  • An ADI integrator API key for Sports, or access to the official Gamma/CLOB and deposit-wallet relayer clients for Crypto. Direct relayer users also need their own Polymarket Builder Credential.
  • A supported source asset returned by GET /api/funding/assets; never hard-code the asset catalog or minimum amount.
  1. Create or read the Trading Account with CREATE_OR_READ_ACCOUNT and the external funding wallet; Reso provisions a separate managed owner.
  2. Create a Reso Credential with CREATE_CREDENTIAL; store the secret and passphrase returned once.
  3. Discover the product market from the product-specific public API.
  4. Read funding assets and create a deposit intent with Reso L2. For Crypto, wait until GET /api/trading/account returns polymarketFunderWallet before transferring funds.
  5. For Crypto, register the managed owner's Polymarket CLOB Credential through a challenge signed by the funding wallet, then prepare polymarketFunderWallet.
  6. Transfer the selected source asset to the intent depositAddress, then poll statusAddress.
  7. Build and managed-owner-sign the product-native order, then submit it with Reso L2 and an Idempotency-Key.
  8. Read the order and private portfolio; public wallet positions and activity need no authentication. Redeem remains a separate Provider wallet action when returned by the API.
  9. Create withdrawals through a WITHDRAW challenge signed by the bound funding wallet. Reso fixes the destination and executes Provider actions; poll until DONE.

Where product signing data comes from

This page and the OpenAPI fully define the Reso account, authentication, funding, submission, and query contracts. ADI and Polymarket payload signing remains a caller-side Provider prerequisite; Reso validates and forwards it but never fabricates an owner signature.

  • BTC 3m: GET /api/trading/markets/{marketId}/config returns the complete Reso signing domain and market rules.
  • ADI Sports: use the public Reso market id, then use your own ADI integrator API key to obtain vault, token, exchange domain, fee, and order parameters from the ADI official API. Reso intentionally does not expose Provider metadata in public market DTOs.
  • Polymarket Crypto: use id/slug/eventId/eventSlug/conditionId from /api/crypto/markets, then use the official Gamma/CLOB APIs or client to resolve token ids, derive the CLOB Credential, and create the exact owner-signed FAK rawBody.

Quick start

Production: https://reso.market

Settlement networkADI Mainnet · Chain ID 36900
Production API and Settlement Root use ADI Mainnet. Chain 36900 is used for both the ADI settlement network and the Trading EIP-712 signing domain.

HTTP base path: /api/trading. WebSocket: wss://<host>/api/trading/ws. Production settlement and Settlement Root use ADI Mainnet chain ID 36900; the Trading EIP-712 signing domain also uses chain ID 36900.

Reso has no dedicated SDK. Node.js clients use viem for owner EIP-712 signatures; add the official Polymarket CLOB and relayer clients only for Crypto.

Where JavaScript Demo environment values come from

VariableSourceRequired
TRADING_BASE_URLUse https://reso.market; no application requiredAlways
TRADING_OWNER_WALLETLegacy Demo name for the external funding wallet; never the platform-managed ownerLegacy preview only
RESO_OWNER_PRIVATE_KEY_FILELegacy Demo funding-wallet key; never a platform-managed owner keyLegacy preview only
RESO_SIGNER_RPC_URLProvided by your managed wallet, HSM, or remote signerChoose one signer
RESO_DEMO_RUNTIME_DIRCreated by the Demo; keep ./runtimeAlways
POLYGON_RPC_URLHTTPS endpoint from a Polygon RPC providerCrypto chain operations only
Code example
# Reso wallet signing and HTTP clientnpm install viem# Crypto only: official Polymarket order and deposit-wallet clientsnpm install @polymarket/clob-client-v2 @polymarket/builder-relayer-client
Code example
curl --fail --silent https://reso.market/api/trading/time# {"serverTimeMs": 1783958400123, "maxRequestSkewMs": 30000}