dYdX exchange configuration, instructions for use

Author: The Little Dream, Created: 2021-10-23 11:19:55, Updated: 2021-10-25 14:56:12

dYdX exchange configuration, instructions for use

FMZ now supports the dYdX exchange.

Exchange documents

The API documentation address is:https://docs.dydx.exchange/#get-account-leaderboard-pnls

The website of the exchange

dYdX currently has a spot, permanent contract, on FMZ permanent contract code isswap

How to configure dYdX for FMZ Quantitative Trading Platform

  • Information needed to configure

    • AccessKey
    • SecretKey
    • Passphrase
    • StarkPublicKey
    • StarkPrivateKey

    Here is a picture:

    img

    How to get the above profile information:

    • The first thing you need is a wallet.

      img

    • Log in to wallet on dYdX

      img

      ETH assets are required in the wallet and then prompted to create a dYdX account.

      img

      The need for changeUSDCIn addition, the DYdX can be used to view the available assets. The following information can then be viewed in your browser:

      img

      You can get it.API_KEY_PAIRSSTARK_KEY_PAIRS

      API_KEY_PAIRS includes:

      key: xxxxxxThe corresponding fill-in on FMZAccess Keysecret: xxxxxxThe corresponding fill-in on FMZSecret Keypassphrase: xxxxxxThe corresponding fill-in on FMZPassphrase

      STARK_KEY_PAIRS includes:

      publicKey: xxxxxxThe corresponding fill-in on FMZStark PublicKeyprivateKey: xxxxxxThe corresponding fill-in on FMZStark PrivateKey

  • Set the limitFee Set the limitFee when ordering and set it to be effective once. For example:

    exchange.IO("limitFee", 0.011)
    
  • Set secondsOfValidity, set to run once. For example: Set the order validity time in units of seconds.

    exchange.IO("secondsOfValidity", 60 * 60 * 24 * 7)   // 设置有效期为7天
    
  • Set simulate, set to one-time effect. For example: Switching the analog environment requires switching the base address tohttps://api.stage.dydx.exchange

    exchange.IO("simulate", true)
    

Other summaries

  • Holdings are not subject to freezing of account assets, but are subject to inspection, and over-holdings are not allowed. When calling GetAccount on FMZ, the structure returnedFrozenBalanceThe field is for the number of holdings of the asset.

  • It is best to have no more than 100 listings, and the exchange interface is limited to 100 orders. Although there is a page-split query, the interface seems to have some problems.


More

ddr13Dreams, I used the official python package dydx-v3-python. Traceback (most recent call last): File "/Users/CHIN/Documents/dydx_workspace_py/dydx-v3-python-master/examples/demodydxcreateorder.py", line 1, in from dydx3 import constants File "/Users/CHIN/Documents/dydx_workspace_py/dydx-v3-python-master/dydx3/__init__.py", line 1, in from dydx3.dydx_client import Client File "/Users/CHIN/Documents/dydx_workspace_py/dydx-v3-python-master/dydx3/dydx_client.py", line 1, in from web3 import Web3 File "/Users/CHIN/Documents/dydx_workspace_py/venv/lib/python 3.6/site-packages/web3/__init__.py", line 9, in the from web3.main import ( File "/Users/CHIN/Documents/dydx_workspace_py/venv/lib/python 3.6/site-packages/web3/main.py", line 87, in the from web3.manager import ( File "/Users/CHIN/Documents/dydx_workspace_py/venv/lib/python 3.6/site-packages/web3/manager.py", line 47, in the from web3.providers import ( File "/Users/CHIN/Documents/dydx_workspace_py/venv/lib/python 3.6/site-packages/web3/providers/__init__.py", line 11, in the from.websocket import (# noqa: F401, File "/Users/CHIN/Documents/dydx_workspace_py/venv/lib/python 3.6/site-packages/web3/providers/websocket.py", line 21, in the from websockets.client import ( File "/Users/CHIN/Documents/dydx_workspace_py/dydx-v3-python-master/examples/websockets.py", line 9, in from dydx3 import Client ImportError: cannot import name 'Client' There are packages that exist, that are import error reports, that are official packages, that should not have any order conflicts and so on.

fantadongI don't know why I can't find STARK_KEY_PAIRS

luke_baoF12 can't find the relevant information?

luke_baoIs it possible to use these key values now?

luke_baoI'd like to know why the "Internal error, couldn't fetch data for subscription: v3_accountsAPI key not found" error?

FMZ_ small white_YYSDHello, I've always wanted to ask, are the ETH and USDC on the Ethereum public chain? my wallet is the ETH and USDC on the HECO chain, the wallet is not balanced when connected, the connection failed is this the problem?

JAnd there's something new to play with.

scottliyqSupport

Difficult to quantifyThe dream is complete, yyds.

TbancoI'm so proud of you, and I'm so proud of you.

YY CAPITIALAPI_KEY_PAIRS is not found

The Little DreamThis Python package is not very clear on how to use it. FMZ has access to dYdX, without the official SDK.

The Little DreamThe first connection requires authentication, which will consume the ETH of the wallet into GAS. Then you can see the strong key pair in the browser.

The Little DreamThere is an authorization process to connect the wallet; the wallet needs ETH.

luke_baoWell, it's probably a browser issue or something, it hasn't been up until now.

The Little DreamI'm not going to change it.

The Little DreamRight-click, go to the browser's console page and look for what you should find. Try it in Chrome.

luke_baoThank you, I found the problem.

The Little DreamI think KEY got it wrong.

The Little DreamYes, I just recently charged, USDC ETH in the wallet is going, after the link on the wallet authorization, one step USDC transfer to dYdX can be done, that is, the fee is a little high, a few dozen U is not necessary.

The Little Dream^^ Thank you for your support of FMZ.

The Little DreamIn order to connect the wallet, the wallet must also have ETH, USDC.