nautilus_betfair/common/
consts.rs1use std::sync::LazyLock;
19
20use nautilus_model::identifiers::Venue;
21use ustr::Ustr;
22
23pub const BETFAIR: &str = "BETFAIR";
25
26pub static BETFAIR_VENUE: LazyLock<Venue> = LazyLock::new(|| Venue::new(Ustr::from(BETFAIR)));
28
29pub const BETFAIR_PRICE_PRECISION: u8 = 2;
31
32pub const BETFAIR_QUANTITY_PRECISION: u8 = 2;
34
35pub const BETFAIR_IDENTITY_URL: &str = "https://identitysso-cert.betfair.com/api";
37
38pub const BETFAIR_BETTING_URL: &str = "https://api.betfair.com/exchange/betting/json-rpc/v1";
40
41pub const BETFAIR_ACCOUNTS_URL: &str = "https://api.betfair.com/exchange/account/json-rpc/v1";
43
44pub const BETFAIR_NAVIGATION_URL: &str =
46 "https://api.betfair.com/exchange/betting/rest/v1/en/navigation/menu.json";
47
48pub const BETFAIR_STREAM_HOST: &str = "stream-api.betfair.com";
50
51pub const BETFAIR_RACE_STREAM_HOST: &str = "sports-data-stream-api.betfair.com";
53
54pub const BETFAIR_STREAM_PORT: u16 = 443;
56
57pub const BETFAIR_IDENTITY_LOGIN_URL: &str = "https://identitysso.betfair.com/api/login";
59
60pub const BETFAIR_KEEP_ALIVE_URL: &str = "https://identitysso.betfair.com/api/keepAlive";
62
63pub const BETFAIR_RATE_LIMIT_DEFAULT: &str = "default";
65pub const BETFAIR_RATE_LIMIT_ORDERS: &str = "orders";
66
67pub const BETFAIR_CUSTOMER_ORDER_REF_MAX_LEN: usize = 32;
72
73pub const METHOD_LIST_MARKET_CATALOGUE: &str = "SportsAPING/v1.0/listMarketCatalogue";
75pub const METHOD_LIST_CURRENT_ORDERS: &str = "SportsAPING/v1.0/listCurrentOrders";
76pub const METHOD_PLACE_ORDERS: &str = "SportsAPING/v1.0/placeOrders";
77pub const METHOD_CANCEL_ORDERS: &str = "SportsAPING/v1.0/cancelOrders";
78pub const METHOD_REPLACE_ORDERS: &str = "SportsAPING/v1.0/replaceOrders";
79
80pub const METHOD_GET_ACCOUNT_FUNDS: &str = "AccountAPING/v1.0/getAccountFunds";
82pub const METHOD_GET_ACCOUNT_DETAILS: &str = "AccountAPING/v1.0/getAccountDetails";
83
84pub const STREAM_OP_AUTHENTICATION: &str = "authentication";
86pub const STREAM_OP_MARKET_SUBSCRIPTION: &str = "marketSubscription";
87pub const STREAM_OP_ORDER_SUBSCRIPTION: &str = "orderSubscription";
88pub const STREAM_OP_RACE_SUBSCRIPTION: &str = "raceSubscription";
89pub const STREAM_OP_HEARTBEAT: &str = "heartbeat";
90
91pub const HEADER_X_AUTHENTICATION: &str = "X-Authentication";
93pub const HEADER_X_APPLICATION: &str = "X-Application";
94
95pub const DEFAULT_BETTING_TYPE: &str = "ODDS";
97pub const DEFAULT_MARKET_TYPE: &str = "WIN";