Expand description
gRPC execution test for dYdX adapter.
This binary tests order submission via gRPC to dYdX v4 mainnet. It demonstrates:
- Wallet initialization from mnemonic
- gRPC client setup
- Instrument loading from HTTP API
- Order submission via gRPC (market and limit orders)
- Order cancellation via gRPC
Usage:
# Set environment variables
export DYDX_MNEMONIC="your mnemonic here"
export DYDX_GRPC_URL="https://dydx-grpc.publicnode.com:443" # Optional
export DYDX_HTTP_URL="https://indexer.dydx.trade" # Optional
**Requirements**:
- Valid dYdX mainnet wallet mnemonic (24 words)
- Mainnet funds in subaccount 0
- Network access to mainnet gRPC and HTTP endpoints
**WARNING**: This connects to mainnet and can place real orders with real funds!Structsยง
- Credentials ๐
Constantsยง
- DEFAULT_
INSTRUMENT ๐ - DEFAULT_
PRICE ๐ - DEFAULT_
QUANTITY ๐ - DEFAULT_
SIDE ๐ - DEFAULT_
SUBACCOUNT ๐
Functionsยง
- cancel_
order_ ๐by_ client_ id - fetch_
open_ ๐orders - generate_
client_ ๐id - load_
credentials ๐ - main ๐
- place_
edge_ ๐test_ order - run_
all_ ๐edge_ case_ tests - run_
all_ ๐edge_ tests - test_
batch_ ๐cancel - test_
cancel_ ๐by_ market - test_
cancel_ ๐specific - test_
duplicate_ ๐cancel - test_
rapid_ ๐sequence - test_
replace_ ๐order