| Crates.io | bluefin-pro |
| lib.rs | bluefin-pro |
| version | 1.1.0 |
| created_at | 2025-04-23 19:25:08.917635+00 |
| updated_at | 2025-05-15 16:48:37.233086+00 |
| description | Software Development Kit for Bluefin Pro |
| homepage | https://bluefin.io/ |
| repository | https://github.com/fireflyprotocol/pro-sdk |
| max_upload_size | |
| id | 1646189 |
| size | 294,795 |
The Bluefin Pro SDK for Rust allows developers to interact with the Bluefin Pro platform using generated client libraries from OpenAPI 3.0 specifications. This SDK enables seamless interaction with REST and WebSocket APIs to perform various trading operations, such as placing orders, withdrawing funds, and subscribing to market feeds.
To generate Rust client code:
cd tools
cargo run --bin apigen -- -l rust
account_authorization, adjust_isolated_margin, update_leverage, create order and withdraw requests securely.Add the following to your Cargo.toml:
[dependencies]
bluefin-sdk = "1.0.0"
Note: Replace 1.0.0 with the latest version available.
The REST APIs are grouped by functionality and defined within the OpenAPI files located in the resources folder of the
repository. These APIs include:
Example usage for REST APIs can be found in the
examplesfolder.
WebSocket APIs enable real-time market data and event subscription. Documentation for WebSocket messages is available
within the OpenAPI specs in resources/websocket-api.yaml file.
Example usage for WebSocket APIs can be found in the
examplesfolder. Websocket examples are prefixed byws-
The SDK provides example code to demonstrate how to use the APIs.
account_authorization, adjust_isolated_margin, update_leverage, create order and withdraw requests.To run examples, navigate to the examples directory and execute them using:
cargo run --example <example_name>
Replace
<example_name>with the specific example file you wish to execute.
The SDK provides test accounts with hex encoded ed25519 public key and private key available to run examples on DEVNET or TESTNET
example.rsis a full example that shows how to use the SDK to perform multiple operations, including fetching account details, exchange info, creating an order, withdrawing funds, and listening to account and market updates.
The SDK comes with built-in support for signing specific API requests:
Create Order Requests: Cryptographically sign your order requests securely.Withdraw Requests: Cryptographically sign your withdrawal requests.Update Leverage Requests: Cryptographically sign your update leverage requests.Adjust Isolated Margin Requests: Cryptographically sign your adjust isolated margin requests.Account Authorization Requests: Cryptographically sign your account authorization requests.For other API interactions, refer to the examples folder for detailed guidance.
If you encounter an issue or have any questions, please feel free to reach out via GitHub issues or the support team.