Dear Community,
Crypto-savvy members of the community have long asked for DeFi exchange integration on the platform. We’re pleased to share that our integration with dYdX Crypto Perpetuals is now live on QuantConnect!
This integration lets users do jupyter research, run backtests and optimizations, along with deploying strategies live to trade perpetuals on dYdX. At this time, dYdX perpetuals trading is not available in the United States, Canada, or other restricted jurisdictions. All use of dYdX is subject to Terms of Use.
Adding any of the 220 dYdX assets to your strategy is simple with the QuantConnect platform. Setting the brokerage model* configures all the fees, leverage, and dataset configuration required, allowing you to add the perpetuals you need.
# Set the correct dYdX exchange models *
self.set_brokerage_model(BrokerageName.DYDX)
# Request market rates for dYdX exchange:
self.add_crypto_future("BTCUSD", Resolution.MINUTE, market=Market.DYDX)
* dYdX is labeled as a "brokerage" solely for convenience, as this classification is used by QuantConnect’s API. dYdX is not a brokerage; it is a decentralized, disintermediated, and permissionless protocol. dYdX is not regulated by any government authority, and users trade at their own risk.
We have onboarded dYdX market data since the dYdX Chain began in May 2021, allowing you to backtest your strategies across various market regimes. Trades and quotes are available in tick, second, minute, hour, and daily resolutions.
This integration is available completely open-source, and available to users of the Cloud Platform, LEAN CLI, and Local Platform. We’ve implemented Market, Limit, Stop Market, and Stop Limit Order types.
To get started, check out the new dYdX documentation.
Happy Trading!
QuantConnect Team
Jared Broad
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!