Skip to main content

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;
21pub mod vault;
22
23#[derive(
24    Debug,
25    Display,
26    Clone,
27    Copy,
28    Serialize,
29    Deserialize,
30    Default,
31    EnumString,
32    PartialEq,
33    Eq,
34    Hash,
35    EnumIter,
36)]
37#[strum(serialize_all = "PascalCase")]
38#[serde(rename_all = "PascalCase")]
39pub enum Blockchain {
40    #[default]
41    Solana,
42    Ethereum,
43    Polygon,
44    Bitcoin,
45    Internal,
46    EqualsMoney,
47    Cardano,
48    Hyperliquid,
49    Story,
50    Bsc,
51    Dogecoin,
52    Sui,
53    XRP,
54    Litecoin,
55    Berachain,
56    HyperEVM,
57    Plasma,
58    Arbitrum,
59    Base,
60    Optimism,
61    Aptos,
62    Sei,
63    Tron,
64    #[strum(serialize = "0G")]
65    #[serde(rename = "0G")]
66    ZeroG,
67    Eclipse,
68    Fogo,
69    Monad,
70    Stable,
71    Zcash,
72    #[serde(other)]
73    Unknown,
74}