Expand description
Static constants for the Derive adapter.
Protocol constants (DOMAIN_SEPARATOR, ACTION_TYPEHASH, per-action module
addresses) are sourced from the “Protocol Constants” reference at
https://docs.derive.xyz/reference/protocol-constants. Both mainnet and
testnet values are populated; per-instance overrides on
crate::config::DeriveExecClientConfig take precedence.
Constants§
- ACTION_
TYPEHASH - EIP-712 action typehash. Identical across networks per Derive’s published Protocol Constants.
- DECIMAL_
SCALE - Fixed-point scale used by all on-chain decimal fields (1e18).
- DEPOSIT_
MODULE_ ADDRESS_ MAINNET - Deposit module contract address (mainnet).
- DEPOSIT_
MODULE_ ADDRESS_ TESTNET - Deposit module contract address (testnet).
- DERIVE
- Venue identifier string.
- DERIVE_
ACCOUNT_ REGISTRATION_ TIMEOUT_ SECS - Default timeout for blocking on account registration during execution
client
connect(). Matches the BitMEX / Bybit / OKX adapters’ 30-second budget. - DERIVE_
CANDLES_ DEFAULT_ LIMIT - DERIVE_
CANDLES_ MAX_ PAGES - DERIVE_
NAUTILUS_ REFERRAL_ CODE - Referral code for order attribution (zero additional fees), see https://docs.derive.xyz/reference/api-broker for further details.
- DERIVE_
TRADES_ PAGE_ SIZE - DOMAIN_
SEPARATOR_ MAINNET - EIP-712 domain separator (mainnet).
- DOMAIN_
SEPARATOR_ TESTNET - EIP-712 domain separator (testnet).
- HEADER_
LYRA_ SIGNATURE - REST authentication header carrying the session-key signature.
- HEADER_
LYRA_ TIMESTAMP - REST authentication header carrying the signed timestamp.
- HEADER_
LYRA_ WALLET - REST authentication header carrying the Derive Chain smart-contract wallet.
- HTTP_
TIMEOUT - MIN_
SIGNATURE_ TTL - Minimum signature TTL the venue accepts for self-custodial actions.
- RECONNECT_
BACKOFF_ FACTOR - RECONNECT_
BASE_ BACKOFF - RECONNECT_
JITTER_ MS - RECONNECT_
MAX_ BACKOFF - RECONNECT_
TIMEOUT - REST_
URL_ MAINNET - REST_
URL_ TESTNET - TRADE_
MODULE_ ADDRESS_ MAINNET - Trade module contract address (mainnet).
- TRADE_
MODULE_ ADDRESS_ TESTNET - Trade module contract address (testnet).
- TRANSFER_
MODULE_ ADDRESS_ MAINNET - Transfer module contract address (mainnet).
- TRANSFER_
MODULE_ ADDRESS_ TESTNET - Transfer module contract address (testnet).
- TRIGGER_
ORDER_ SIGNATURE_ TTL - Signature TTL used for Derive trigger orders.
- WITHDRAW_
MODULE_ ADDRESS_ MAINNET - Withdrawal module contract address (mainnet).
- WITHDRAW_
MODULE_ ADDRESS_ TESTNET - Withdrawal module contract address (testnet).
- WS_
DISCONNECT_ TIMEOUT - WS_
HEARTBEAT_ SECS - WS_
REQUEST_ TIMEOUT - Maximum wait for a JSON-RPC response on the WebSocket transport before the
request outcome is treated as unknown, so a silent venue cannot hang
connect()or an order write. MatchesHTTP_TIMEOUT. - WS_
URL_ MAINNET - WS_
URL_ TESTNET
Statics§
- DERIVE_
CLIENT_ ID - Static client ID instance.
- DERIVE_
VENUE - Static venue instance.
Functions§
- domain_
separator_ for - Returns the EIP-712 domain separator constant for the configured environment.
- trade_
module_ address_ for - Returns the Trade module contract address constant for the configured environment.