1 unstable release

new 0.1.0 Oct 28, 2024

#71 in Finance

LicenseRef-dYdX-Custom

245KB
5K SLoC

Rust client for dYdX v4

The crate implements interaction with the dYdX API.

The following features are implemented:

  • NodeClient, IndexerClient + WebSockets, FaucetClient, NobleClient
  • Fully asynchronous implementation
  • Telemetry
  • Convenient builder for constructing requests
  • Automatic WS connection support

Install

To add the crate to your project, use the command:

cargo add dydx

Development

Workspace consists of a single crate:

  • client - to provide connection management with dYdX, common types and utils

Prerequisites

Examples

To run the example, you need to use the cargo command as follows:

cargo run --example bot_basic_adder

You can find the full set of examples in the examples folder.

Code quality assurance

Before publishing make sure to run (and fix all warnings and errors)

cargo fmt
cargo clippy
cargo deny check licenses advisories sources

Documentation

To generate the documentation, use the command

cargo doc -p dydx

Acknowledgements

Built by Nethermind: @v0-e, @therustmonk, @maksimryndin

For more details about the grant see link.

Dependencies

~29–45MB
~804K SLoC