use crate::model::{
AssetBalance, DepositRecord, Order, PaginatedResponse, TransferalRecord, WithdrawalRecord,
};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct CreateNewAPIKeyResponse {
pub api_key: String,
pub created_at: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct GetAPIKeyResponse {
pub api_key: String,
pub created_at: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct GetOperationKeyResponse {
pub encrypted_operation_key: String,
pub operation_key_hash: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct BuildDepositTransactionResponse {
pub tx_hex: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SubmitDepositTransactionResponse {
pub tx_hash: String,
}
pub type GetDepositRecordsResponse = Vec<DepositRecord>;
pub type GetWithdrawalRecordsResponse = Vec<WithdrawalRecord>;
pub type GetTransferalRecordsResponse = Vec<TransferalRecord>;
pub type GetOrderResponse = Order;
pub type GetOpenOrdersResponse = PaginatedResponse<Order>;
pub type GetTradeOrdersResponse = PaginatedResponse<Order>;
pub type GetAccountTradesResponse = PaginatedResponse<Order>;
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct BuildWithdrawalTransactionResponse {
pub tx_hex: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct BuildTransferalTransactionResponse {
pub tx_hex: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct BuildRequestTransferalTransactionResponse {
pub tx_hex: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SubmitWithdrawalTransactionResponse {
pub tx_hash: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SubmitTransferalTransactionResponse {
pub tx_hash: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SubmitRequestTransferalTransactionResponse {
pub tx_hash: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct GetAccountInfoResponse {
pub api_key: String,
pub api_limit: i32,
pub created_at: String,
pub updated_at: String,
}
pub type GetAccountBalanceResponse = Vec<AssetBalance>;
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct GetMaxDepositResponse {
pub max_deposit: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct GetSpotAccountResponse {
pub account_id: String,
pub account_type: String,
pub encrypted_operation_key: String,
pub operation_key_hash: String,
pub created_at: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct CreateSpotAccountResponse {
pub account_id: String,
pub account_type: String,
pub encrypted_operation_key: String,
pub operation_key_hash: String,
pub created_at: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct UpdateSpotAccountResponse {
pub account_id: String,
pub account_type: String,
pub encrypted_operation_key: String,
pub operation_key_hash: String,
pub created_at: String,
pub updated_at: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct GetTransferalRecordByTxHashResponse {
#[serde(flatten)]
pub record: TransferalRecord,
}