FAQ & Resources

Ecosystem Tools FAQ

Are there any multi-sig and/or MPCs that support the dYdX chain?

Yes, there are a few options Keplr Multisig, Fordefi

Please provide a transaction to exchange the USDC from the Noble chain to the USDC of the Ethereum chain for reference?

Front End FAQ

Is there a way to get user's BuyingPower from API? Or from SDK?

You can get equity and freeCollateral from the /v4/addresses/<address> endpoint

*https://docs.dydx.trade/developers/indexer/indexer_api#getaddress*

it won't make sense to get BuyingPower from API since each market has different maximum leverage

I cant find a GoodTilBlock param in the placeOrder function
Sometimes I get "FillOrKill order could not be fully filled" error after I place a market order in ETH-USD market on a testnet, but in fact I'm sending the timeInForce: "GTT" (and provide "goodTilTimeInSeconds"), not "FOK", do you have any hints what am I doing wrong? I'm using placeOrder function from your js sdk
Do you have an example on how to hexidecimal -> accAddress.

*https://twitter.com/LawrenceChiu14/status/1716491077673275876*

You still need to own the metamask address (have the private key) to run the derivation to determine dydxaddress

If you don't own the metamask address, it's not possible to derive

Essentially : metamask address —> sign a message —> dydx address

If you can't sign the message, then you can't get the dydx address

I want to create an alternative UI for dydx and user will sign a message with metamask to login

The user can connect their metamask wallet to your alternative UI. Then you just ask the user to sign the message like in my example. The frontend code is open-source, it can be used for reference https://github.com/dydxprotocol/v4-web

Websocket FAQ

In the Indexer Websocket service, do we need to maintain a heartbeat stream to keep connected?
Is it possible to subscribe to a new block event via ws?
  • That's not available on websocket, however, it is available via REST https://v4- teacher.vercel.app/integration_docs/indexer_api#getheightor If you run a full node that can keep up with the chain, you would always know the block height (second way is recommended so you don't hit the rate limit on the REST endpoint)

How can we know the block number of an orderbook snapshot we get on websocket or on indexer rest api request?
Can we assume one orderbook update will be published per block? Per Pair
  • No because the order book is off chain

Is it possible to subscribe to trade confirmation events via ws?
  • You can get fills via ws, v4_subaccount channel

We want to inspect order info from GET /orders/{orderId}, How do I get this orderID without using GET /orders, because there may be too many orders in the queue. Could i get orderID through clientID or txs_hash?
  • If you run a websocket client, you could just monitor the v4_subaccounts feedthat'll have orders so you can see the orderId and match that up with the clientId

Last updated