Venue bindings

Prepare one or several venue bindings

Wallet EIP-191 message: Mobius venue binding v1\ndomain=<BINDING_AUTH_DOMAIN or mobius-api>\naction=<prepare or read>\npayload=<canonical JSON>, with actual newline characters and no trailing newline. Canonical JSON recursively sorts object keys, preserves array order, and contains no whitespace. Lowercase the owner. Sign the exact message; ECDSA wallets only. Prepare payload is {owner,venues,nonce,expiresAt}. Nonce is idempotent per owner: identical requests return the same sessions; changed content conflicts. Signature is valid at most 300 seconds; binding sessions last 10 minutes. Existing usable bindings return already_bound. Explicit rebind is required for unusable credentials, and active strategies/orders block it. Preparation is atomic; venue execution later permits partial success. This route uses wallet authorization in the JSON body and does not use Bearer authentication. Fee approval is included when server configuration enables it: HL uses a separate approveBuilderFee signature; Aster includes Builder/MaxFeeRate/BuilderName in ApproveAgent; both Lighter deployments use a wallet Mobius authorization followed by an L2 integrator transaction with four zero caps. Example base HL/Aster builder fee is 15 tenths bps (0.015%), doubled to 30 (0.03%) on strategy legs paired with Lighter; the approval cap is 0.1%, represented as "0.001" for Aster. Lighter indexes 994 and 735705 have zero extra integrator fee. See venue-bindings.md for configured builder addresses and full rules. Sign live prepare payloads; the response example contains illustrative values. Known Lighter integrator addresses: Robinhood index 994 maps to 0x494c2E39910a6d1929b65F06c734f4d873d733D6; canonical index 735705 maps to 0x327F0cBa516CA1B343978a3AC60448b33d95131c. Authorization targets the index, not the address. New requests check HL and Lighter target accounts before generating keys or saving a batch. HL uses userRole; Lighter uses accountsByL1Address and verifies ownership of the supplied accountIndex. Missing accounts return 422 venue_account_not_found; invalid Lighter ownership returns 403 account_not_owned. Lookup failure returns 503 venue_account_check_unavailable. Aster skips account-existence preflight. The worker submits its native signed agent/builder authorization and confirms both before storing a bound credential. First-time Aster preparation is permitted; existing credentials still require live verification for already_bound. Identical nonce replays reuse the original batch without repeating preflight. Lighter WASM signer chain IDs: Robinhood production 466324, canonical production 304, testnet 300. They are not settlement chain IDs. Incorrect prepared signing domains fail with invalid_signing_chain and require a new binding. Server-generated Lighter API-key slots use 5-254 excluding reserved slot 157; 0-3 are reserved and 4 is retained for legacy Mobius keys. API and funding servers must share DATABASE_URL, BOT_CREDENTIAL_KEY and venue/builder configuration. BINDING_AUTH_DOMAIN is a public prepare/read signing label that must match the client. Restart both servers after configuration or binding-code updates.

post/v1/venue-bindings/prepare

Request

  • Base URL: https://api.mob.exchange
  • URL: https://api.mob.exchange/v1/venue-bindings/prepare
  • Auth: none required

Request body

ownerstring required

Response

Immutable signing requests and current per-venue state.

bindingIdstring uuid required
ownerstring required
expiresAtstring date-time required
status'awaiting_signatures' | 'processing' | 'bound' | 'partial_success' | 'failed' required

Changes

No recorded changes to this operation across all 1 revision of this API.