bpx_api_types/
lib.rs

1//! Types module for the Backpack Exchange API.
2//!
3//! This module contains various types used across the Backpack Exchange API,
4//! including enums and structs for capital, markets, orders, trades, and user data.
5
6use serde::{Deserialize, Serialize};
7use strum::{Display, EnumIter, EnumString};
8
9pub mod account;
10pub mod borrow_lend;
11pub mod capital;
12pub mod fill;
13pub mod futures;
14pub mod history;
15pub mod margin;
16pub mod markets;
17pub mod order;
18pub mod rfq;
19pub mod trade;
20pub mod user;
21
22#[derive(
23    Debug,
24    Display,
25    Clone,
26    Copy,
27    Serialize,
28    Deserialize,
29    Default,
30    EnumString,
31    PartialEq,
32    Eq,
33    Hash,
34    EnumIter,
35)]
36#[strum(serialize_all = "PascalCase")]
37#[serde(rename_all = "PascalCase")]
38pub enum Blockchain {
39    #[default]
40    Solana,
41    Ethereum,
42    Polygon,
43    Bitcoin,
44    Internal,
45    EqualsMoney,
46    Cardano,
47    Hyperliquid,
48    Story,
49    Bsc,
50    Dogecoin,
51    Sui,
52    XRP,
53    Litecoin,
54    Berachain,
55    HyperEVM,
56    Plasma,
57    Arbitrum,
58    Base,
59    Optimism,
60    Aptos,
61    Sei,
62    Tron,
63    #[strum(serialize = "0G")]
64    #[serde(rename = "0G")]
65    ZeroG,
66    Eclipse,
67}