2 stable releases

1.1.0 May 15, 2025
1.0.0 Apr 23, 2025

#41 in WebSocket

29 downloads per month
Used in bluefin-pro

MIT/Apache

260KB
5K SLoC

Rust API client for bluefin_api

Bluefin API

Overview

This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version: 1.1.0
  • Generator version: 7.11.0
  • Build package: org.openapitools.codegen.languages.RustClientCodegen

Installation

Put the package under your project folder in a directory named bluefin_api and add the following to Cargo.toml under [dependencies]:

bluefin_api = { path = "./bluefin_api" }

Documentation for API Endpoints

All URIs are relative to https://api.sui-staging.bluefin.io

Class Method HTTP request Description
AccountDataApi get_account_details GET /api/v1/account Get user's account details.
AccountDataApi get_account_funding_rate_history GET /api/v1/account/fundingRateHistory Get user's funding rate history
AccountDataApi get_account_preferences GET /api/v1/account/preferences Get user's account preferences.
AccountDataApi get_account_trades GET /api/v1/account/trades Get user's trade history.
AccountDataApi get_account_transaction_history GET /api/v1/account/transactions Get user's transaction history (any change in balance).
AuthApi auth_jwks_get GET /auth/jwks
AuthApi auth_token_post POST /auth/token
AuthApi auth_token_refresh_put PUT /auth/token/refresh
AuthApi auth_v2_token_post POST /auth/v2/token
ExchangeApi get_all_market_ticker GET /v1/exchange/tickers Get all market ticker information
ExchangeApi get_candlestick_data GET /v1/exchange/candlesticks Kline/candlestick data.
ExchangeApi get_exchange_info GET /v1/exchange/info Get exchange information
ExchangeApi get_funding_rate_history GET /v1/exchange/fundingRateHistory Get funding rate history
ExchangeApi get_market_ticker GET /v1/exchange/ticker Aggregated market ticker information
ExchangeApi get_orderbook_depth GET /v1/exchange/depth Orderbook depth
ExchangeApi get_recent_trades GET /v1/exchange/trades Recent trades list
RewardsApi get_campaign_rewards GET /v1/rewards/campaign Get rewards information for a specific campaign
RewardsApi get_rewards GET /v1/rewards Get rewards information for the intervals
RewardsApi get_rewards_campaign_metadata GET /v1/rewards/metadata/campaign Get rewards metadata for the campaigns
RewardsApi get_rewards_epoch_config_metadata GET /v1/rewards/metadata/epoch/configs Gets the latest epoch configs for the campaigns
RewardsApi get_rewards_epoch_metadata GET /v1/rewards/metadata/epoch Gets the latest or next epoch for campaign.
RewardsApi get_rewards_interval_metadata GET /v1/rewards/metadata/interval Gets the interval metadata for provided parameters
RewardsApi get_rewards_summary GET /v1/rewards/summary Get rewards information for all time rewards earned
StreamsApi web_socket_account_data GET /ws/account WebSocket Account Streams
StreamsApi web_socket_market_data GET /ws/market WebSocket Market Streams
TradeApi cancel_orders PUT /api/v1/trade/orders/cancel Cancel orders for a market using order hashes
TradeApi cancel_standby_orders PUT /api/v1/trade/orders/cancel/standby Cancel orders in standby for a market using order hashes
TradeApi get_open_orders GET /api/v1/trade/openOrders Get Open Orders
TradeApi get_standby_orders GET /api/v1/trade/standbyOrders Get Orders in Standby
TradeApi post_create_order POST /api/v1/trade/orders Create a new order
TradeApi post_withdraw POST /api/v1/trade/withdraw Initiate a withdraw
TradeApi put_adjust_isolated_margin PUT /api/v1/trade/adjustIsolatedMargin Adjust margin for an isolated position for a symbol
TradeApi put_authorize_account PUT /api/v1/trade/accounts/authorize Authorizes an account
TradeApi put_deauthorize_account PUT /api/v1/trade/accounts/deauthorize Deauthorizes an account
TradeApi put_leverage_update PUT /api/v1/trade/leverage Updates leverage for positions

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author

Dependencies

~5–16MB
~206K SLoC