Expand description
Static constants for the Derive adapter.
EIP-712 domain separators, the Action typehash, and Trade module addresses
are sourced from the v3 action-signing reference at
https://docs.derive.xyz/authentication/action-signing. Both mainnet and
testnet values are populated; per-instance overrides on
crate::config::DeriveExecutionClientConfig take precedence.
Constants§
- ACTION_
TYPEHASH - EIP-712 action typehash, identical across networks in the v3 action-signing reference.
- DECIMAL_
PRECISION - Maximum fractional precision accepted for v3 financial inputs.
- 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(). - 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 (Ethereum chain 1).
- DOMAIN_
SEPARATOR_ TESTNET - EIP-712 domain separator (Sepolia chain 11155111).
- HEADER_
DERIVE_ SIGNATURE - REST authentication header carrying the session-key signature.
- HEADER_
DERIVE_ TIMESTAMP - REST authentication header carrying the signed timestamp.
- HEADER_
DERIVE_ WALLET - REST authentication header carrying the owner’s EOA or multisig address.
- HTTP_
TIMEOUT - MIN_
SIGNATURE_ TTL - Minimum signature TTL the adapter uses for self-custodial orders.
- 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_
HEARTBEAT_ TIMEOUT - 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.