use http::Method;
use super::Request;
use super::definitions::*;
use serde_json::Value;
use serde::{Deserialize, Serialize};
use chrono::{DateTime, Utc};
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetAnnouncementRequest {
pub columns: Option<Value>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetAnnouncementUrgentRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetApiKeyRequest {
pub reverse: Option<bool>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetChatRequest {
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "channelID")]
pub channel_id: Option<f64>
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostChatRequest {
pub message: String,
#[serde(rename = "channelID")]
pub channel_id: Option<f64>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetChatChannelsRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetChatConnectedRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetExecutionRequest {
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetExecutionTradeHistoryRequest {
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetFundingRequest {
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetInstrumentRequest {
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetInstrumentActiveRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetInstrumentIndicesRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetInstrumentActiveAndIndicesRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetInstrumentActiveIntervalsRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetInstrumentCompositeIndexRequest {
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetInsuranceRequest {
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetLeaderboardRequest {
pub method: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetLeaderboardNameRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetLeaderboardNameResponse {
pub name: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetLiquidationRequest {
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetGlobalNotificationRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetOrderRequest {
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostOrderRequest {
pub symbol: String,
pub side: Option<super::Side>,
#[serde(rename = "simpleOrderQty")]
pub simple_order_qty: Option<f64>,
#[serde(rename = "orderQty")]
pub order_qty: Option<i32>,
pub price: Option<f64>,
#[serde(rename = "displayQty")]
pub display_qty: Option<i32>,
#[serde(rename = "stopPx")]
pub stop_px: Option<f64>,
#[serde(rename = "clOrdID")]
pub cl_ord_id: Option<String>,
#[serde(rename = "clOrdLinkID")]
pub cl_ord_link_id: Option<String>,
#[serde(rename = "pegOffsetValue")]
pub peg_offset_value: Option<f64>,
#[serde(rename = "pegPriceType")]
pub peg_price_type: Option<super::PegPriceType>,
#[serde(rename = "ordType")]
pub ord_type: Option<super::OrdType>,
#[serde(rename = "timeInForce")]
pub time_in_force: Option<super::TimeInForce>,
#[serde(rename = "execInst")]
pub exec_inst: Option<super::ExecInst>,
#[serde(rename = "contingencyType")]
pub contingency_type: Option<super::ContingencyType>,
pub text: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct PutOrderRequest {
#[serde(rename = "orderID")]
pub order_id: Option<String>,
#[serde(rename = "origClOrdID")]
pub orig_cl_ord_id: Option<String>,
#[serde(rename = "clOrdID")]
pub cl_ord_id: Option<String>,
#[serde(rename = "simpleOrderQty")]
pub simple_order_qty: Option<f64>,
#[serde(rename = "orderQty")]
pub order_qty: Option<i32>,
#[serde(rename = "simpleLeavesQty")]
pub simple_leaves_qty: Option<f64>,
#[serde(rename = "leavesQty")]
pub leaves_qty: Option<i32>,
pub price: Option<f64>,
#[serde(rename = "stopPx")]
pub stop_px: Option<f64>,
#[serde(rename = "pegOffsetValue")]
pub peg_offset_value: Option<f64>,
pub text: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct DeleteOrderRequest {
#[serde(rename = "orderID")]
pub order_id: Option<Value>,
#[serde(rename = "clOrdID")]
pub cl_ord_id: Option<Value>,
pub text: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct PostOrderBulkRequest {
pub orders: Option<Vec<PostOrderRequest>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct PutOrderBulkRequest {
pub orders: Option<Vec<PutOrderRequest>>
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostOrderClosePositionRequest {
pub symbol: String,
pub price: Option<f64>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct DeleteOrderAllRequest {
pub symbol: Option<String>,
pub filter: Option<Value>,
pub text: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostOrderCancelAllAfterRequest {
pub timeout: f64
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct PostOrderCancelAllAfterResponse(serde_json::Value);
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct GetOrderBookL2Request {
pub symbol: String,
pub depth: Option<i32>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetPositionRequest {
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostPositionIsolateRequest {
pub symbol: String,
pub enabled: Option<bool>
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostPositionRiskLimitRequest {
pub symbol: String,
#[serde(rename = "riskLimit")]
pub risk_limit: i64
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostPositionTransferMarginRequest {
pub symbol: String,
pub amount: i64
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostPositionLeverageRequest {
pub symbol: String,
pub leverage: f64
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetQuoteRequest {
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetQuoteBucketedRequest {
#[serde(rename = "binSize")]
pub bin_size: Option<super::BinSize>,
pub partial: Option<bool>,
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetSchemaRequest {
pub model: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetSchemaResponse(serde_json::Value);
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetSchemaWebsocketHelpRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetSchemaWebsocketHelpResponse(serde_json::Value);
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetSettlementRequest {
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetStatsRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetStatsHistoryRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetStatsHistoryUSDRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetTradeRequest {
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetTradeBucketedRequest {
#[serde(rename = "binSize")]
pub bin_size: Option<super::BinSize>,
pub partial: Option<bool>,
pub symbol: Option<String>,
pub filter: Option<Value>,
pub columns: Option<Value>,
pub count: Option<i32>,
pub start: Option<i32>,
pub reverse: Option<bool>,
#[serde(rename = "startTime")]
pub start_time: Option<DateTime<Utc>>,
#[serde(rename = "endTime")]
pub end_time: Option<DateTime<Utc>>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserDepositAddressRequest {
pub currency: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserWalletRequest {
pub currency: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserWalletHistoryRequest {
pub currency: Option<String>,
pub count: Option<f64>,
pub start: Option<f64>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserWalletSummaryRequest {
pub currency: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct GetUserExecutionHistoryRequest {
pub symbol: String,
pub timestamp: DateTime<Utc>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserExecutionHistoryResponse(serde_json::Value);
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserMinWithdrawalFeeRequest {
pub currency: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserMinWithdrawalFeeResponse(serde_json::Value);
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostUserRequestWithdrawalRequest {
#[serde(rename = "otpToken")]
pub otp_token: Option<String>,
pub currency: String,
pub amount: i64,
pub address: String,
pub fee: Option<f64>,
pub text: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostUserCancelWithdrawalRequest {
pub token: String
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostUserConfirmWithdrawalRequest {
pub token: String
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostUserConfirmEmailRequest {
pub token: String
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserAffiliateStatusRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserCheckReferralCodeRequest {
#[serde(rename = "referralCode")]
pub referral_code: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserQuoteFillRatioRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct PostUserLogoutRequest;
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostUserPreferencesRequest {
pub prefs: Value,
pub overwrite: Option<bool>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserCommissionRequest;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserMarginRequest {
pub currency: Option<String>
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PostUserCommunicationTokenRequest {
pub token: String,
#[serde(rename = "platformAgent")]
pub platform_agent: String
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserEventRequest {
pub count: Option<f64>,
#[serde(rename = "startId")]
pub start_id: Option<f64>
}
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct GetUserEventResponse {
#[serde(rename = "userEvents")]
pub user_events: Vec<UserEvent>
}
impl Request for GetAnnouncementRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/announcement";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Announcement>;
}
impl Request for GetAnnouncementUrgentRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/announcement/urgent";
const HAS_PAYLOAD: bool = false;
type Response = Vec<Announcement>;
}
impl Request for GetApiKeyRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/apiKey";
const HAS_PAYLOAD: bool = true;
type Response = Vec<APIKey>;
}
impl Request for GetChatRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/chat";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Chat>;
}
impl Request for PostChatRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/chat";
const HAS_PAYLOAD: bool = true;
type Response = Chat;
}
impl Request for GetChatChannelsRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/chat/channels";
const HAS_PAYLOAD: bool = false;
type Response = Vec<ChatChannel>;
}
impl Request for GetChatConnectedRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/chat/connected";
const HAS_PAYLOAD: bool = false;
type Response = ConnectedUsers;
}
impl Request for GetExecutionRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/execution";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Execution>;
}
impl Request for GetExecutionTradeHistoryRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/execution/tradeHistory";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Execution>;
}
impl Request for GetFundingRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/funding";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Funding>;
}
impl Request for GetInstrumentRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/instrument";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Instrument>;
}
impl Request for GetInstrumentActiveRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/instrument/active";
const HAS_PAYLOAD: bool = false;
type Response = Vec<Instrument>;
}
impl Request for GetInstrumentIndicesRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/instrument/indices";
const HAS_PAYLOAD: bool = false;
type Response = Vec<Instrument>;
}
impl Request for GetInstrumentActiveAndIndicesRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/instrument/activeAndIndices";
const HAS_PAYLOAD: bool = false;
type Response = Vec<Instrument>;
}
impl Request for GetInstrumentActiveIntervalsRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/instrument/activeIntervals";
const HAS_PAYLOAD: bool = false;
type Response = InstrumentInterval;
}
impl Request for GetInstrumentCompositeIndexRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/instrument/compositeIndex";
const HAS_PAYLOAD: bool = true;
type Response = Vec<IndexComposite>;
}
impl Request for GetInsuranceRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/insurance";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Insurance>;
}
impl Request for GetLeaderboardRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/leaderboard";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Leaderboard>;
}
impl Request for GetLeaderboardNameRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/leaderboard/name";
const HAS_PAYLOAD: bool = false;
type Response = GetLeaderboardNameResponse;
}
impl Request for GetLiquidationRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/liquidation";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Liquidation>;
}
impl Request for GetGlobalNotificationRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/globalNotification";
const HAS_PAYLOAD: bool = false;
type Response = Vec<GlobalNotification>;
}
impl Request for GetOrderRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/order";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Order>;
}
impl Request for PostOrderRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/order";
const HAS_PAYLOAD: bool = true;
type Response = Order;
}
impl Request for PutOrderRequest {
const METHOD: Method = Method::PUT;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/order";
const HAS_PAYLOAD: bool = true;
type Response = Order;
}
impl Request for DeleteOrderRequest {
const METHOD: Method = Method::DELETE;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/order";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Order>;
}
impl Request for PostOrderBulkRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/order/bulk";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Order>;
}
impl Request for PutOrderBulkRequest {
const METHOD: Method = Method::PUT;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/order/bulk";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Order>;
}
impl Request for PostOrderClosePositionRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/order/closePosition";
const HAS_PAYLOAD: bool = true;
type Response = Order;
}
impl Request for DeleteOrderAllRequest {
const METHOD: Method = Method::DELETE;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/order/all";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Order>;
}
impl Request for PostOrderCancelAllAfterRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/order/cancelAllAfter";
const HAS_PAYLOAD: bool = true;
type Response = PostOrderCancelAllAfterResponse;
}
impl Request for GetOrderBookL2Request {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/orderBook/L2";
const HAS_PAYLOAD: bool = true;
type Response = Vec<OrderBookL2>;
}
impl Request for GetPositionRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/position";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Position>;
}
impl Request for PostPositionIsolateRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/position/isolate";
const HAS_PAYLOAD: bool = true;
type Response = Position;
}
impl Request for PostPositionRiskLimitRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/position/riskLimit";
const HAS_PAYLOAD: bool = true;
type Response = Position;
}
impl Request for PostPositionTransferMarginRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/position/transferMargin";
const HAS_PAYLOAD: bool = true;
type Response = Position;
}
impl Request for PostPositionLeverageRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/position/leverage";
const HAS_PAYLOAD: bool = true;
type Response = Position;
}
impl Request for GetQuoteRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/quote";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Quote>;
}
impl Request for GetQuoteBucketedRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/quote/bucketed";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Quote>;
}
impl Request for GetSchemaRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/schema";
const HAS_PAYLOAD: bool = true;
type Response = GetSchemaResponse;
}
impl Request for GetSchemaWebsocketHelpRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/schema/websocketHelp";
const HAS_PAYLOAD: bool = false;
type Response = GetSchemaWebsocketHelpResponse;
}
impl Request for GetSettlementRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/settlement";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Settlement>;
}
impl Request for GetStatsRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/stats";
const HAS_PAYLOAD: bool = false;
type Response = Vec<Stats>;
}
impl Request for GetStatsHistoryRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/stats/history";
const HAS_PAYLOAD: bool = false;
type Response = Vec<StatsHistory>;
}
impl Request for GetStatsHistoryUSDRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/stats/historyUSD";
const HAS_PAYLOAD: bool = false;
type Response = Vec<StatsUSD>;
}
impl Request for GetTradeRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/trade";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Trade>;
}
impl Request for GetTradeBucketedRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/trade/bucketed";
const HAS_PAYLOAD: bool = true;
type Response = Vec<TradeBin>;
}
impl Request for GetUserDepositAddressRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user/depositAddress";
const HAS_PAYLOAD: bool = true;
type Response = String;
}
impl Request for GetUserWalletRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user/wallet";
const HAS_PAYLOAD: bool = true;
type Response = Wallet;
}
impl Request for GetUserWalletHistoryRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user/walletHistory";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Transaction>;
}
impl Request for GetUserWalletSummaryRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user/walletSummary";
const HAS_PAYLOAD: bool = true;
type Response = Vec<Transaction>;
}
impl Request for GetUserExecutionHistoryRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user/executionHistory";
const HAS_PAYLOAD: bool = true;
type Response = GetUserExecutionHistoryResponse;
}
impl Request for GetUserMinWithdrawalFeeRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/user/minWithdrawalFee";
const HAS_PAYLOAD: bool = true;
type Response = GetUserMinWithdrawalFeeResponse;
}
impl Request for PostUserRequestWithdrawalRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user/requestWithdrawal";
const HAS_PAYLOAD: bool = true;
type Response = Transaction;
}
impl Request for PostUserCancelWithdrawalRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/user/cancelWithdrawal";
const HAS_PAYLOAD: bool = true;
type Response = Transaction;
}
impl Request for PostUserConfirmWithdrawalRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/user/confirmWithdrawal";
const HAS_PAYLOAD: bool = true;
type Response = Transaction;
}
impl Request for PostUserConfirmEmailRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/user/confirmEmail";
const HAS_PAYLOAD: bool = true;
type Response = AccessToken;
}
impl Request for GetUserAffiliateStatusRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user/affiliateStatus";
const HAS_PAYLOAD: bool = false;
type Response = Affiliate;
}
impl Request for GetUserCheckReferralCodeRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/user/checkReferralCode";
const HAS_PAYLOAD: bool = true;
type Response = f64;
}
impl Request for GetUserQuoteFillRatioRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user/quoteFillRatio";
const HAS_PAYLOAD: bool = false;
type Response = QuoteFillRatio;
}
impl Request for PostUserLogoutRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = false;
const ENDPOINT: &'static str = "/user/logout";
const HAS_PAYLOAD: bool = false;
type Response = ();
}
impl Request for PostUserPreferencesRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user/preferences";
const HAS_PAYLOAD: bool = true;
type Response = User;
}
impl Request for GetUserRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user";
const HAS_PAYLOAD: bool = false;
type Response = User;
}
impl Request for GetUserCommissionRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user/commission";
const HAS_PAYLOAD: bool = false;
type Response = UserCommissionsBySymbol;
}
impl Request for GetUserMarginRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user/margin";
const HAS_PAYLOAD: bool = true;
type Response = Margin;
}
impl Request for PostUserCommunicationTokenRequest {
const METHOD: Method = Method::POST;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/user/communicationToken";
const HAS_PAYLOAD: bool = true;
type Response = Vec<CommunicationToken>;
}
impl Request for GetUserEventRequest {
const METHOD: Method = Method::GET;
const SIGNED: bool = true;
const ENDPOINT: &'static str = "/userEvent";
const HAS_PAYLOAD: bool = true;
type Response = GetUserEventResponse;
}