/* Generated by typeshare 1.0.0 */ export type I64 = number; export type PriceMap = Record; export type BalancesMap = Record; export type AccountBalancesMap = Record; export type PositionsMap = Record; export type AccountPositionsMap = Record; export type LatencyMap = Record; export type ExchangeSymbolsMap = Record; export interface InternalSymbol { symbol?: string; exchange?: ExchangeSymbolsMap; } export interface OpenOrder { sid: string; order_id: string; created_at: I64; symbol: string; ins_type: string; side: TradeSide; price: number; filled_qty: number; filled_notional: number; remaining_qty: number; remaining_notional: number; status: OrderStatus; lat?: I64; tif?: OrderTif; } export interface Fill { ts: I64; sid: string; oid: string; tid: string; stat: OrderStatus; side: TradeSide; sym: string; ins: string; p: number; q: number; qn: number; fee: number; lat?: LatencyMap; t_ts?: I64; tif?: OrderTif; m?: boolean; } export interface Balances { sid: string; ts: I64; notional: number; balances: AccountBalancesMap; pos_notional: number; positions: AccountPositionsMap; failure: boolean; } export interface AssetBalance { total: number; locked: number; notional: number; } export interface Position { total: number; notional: number; side: PositionSide; leverage: number; maint_margin: number; } export interface BalanceTransfer { _id?: string; sid: string; ts: I64; amount: number; enabled: boolean; other?: string; requester?: string; sender?: string; approvers?: string[]; symbol?: string; coin_amount?: number; link?: string; } export interface Subaccount { _id?: string; name: string; subaccount: string; team: string; portfolio: string; trader: string; exchange: Exchange; enabled: boolean; created_at?: I64; updated_at?: I64; client_funds?: boolean; symbols?: string[]; check_staked?: boolean; binance_spot?: boolean; binance_spot_margin?: boolean; binance_usdmf?: boolean; bybit_spot?: boolean; bybit_usdt_perp?: boolean; } export interface ExchangeApiKeys { sid?: string; key: string; secret: string; passphrase?: string; } export interface BinanceFee { vip: I64; ins: BinanceInstrument; maker: number; taker: number; quote?: BinanceUsdmfQuote; } export enum Exchange { Binance = "binance", Bybit = "bybit", Injective = "injective", Okx = "okx", Huobi = "huobi", Bitmart = "bitmart", Bitkub = "bitkub", Dydx = "dydx", Kucoin = "kucoin", Bluefin = "bluefin", } export enum MarketType { Spot = "spot", LinearSwap = "linear_swap", } export enum TradeSide { Buy = "buy", Sell = "sell", } export enum PositionSide { Long = "long", Short = "short", Both = "both", Unknown = "unknown", } export enum AggType { Pnl = "pnl", } export enum OrderStatus { Submitted = "SUBMITTED", New = "NEW", PartiallyFilled = "PARTIALLY_FILLED", Filled = "FILLED", PendingCancel = "PENDING_CANCEL", Canceled = "CANCELED", PartiallyCanceled = "PARTIALLY_CANCELED", Rejected = "REJECTED", Expired = "EXPIRED", } export enum OrderTif { Gtc = "gtc", Gtx = "gtx", Ioc = "ioc", Fok = "fok", LimitFok = "limit_fok", StopLimitFok = "stop_limit_fok", PostOnly = "post_only", Market = "market", Limit = "limit", OptimalLimitIoc = "optimal_limit_ioc", LimitMaker = "limit_maker", StopLimit = "stop_limit", } export enum AccountType { Spot = "spot", SpotMargin = "spot_margin", Perp = "perp", Future = "future", Trading = "trading", Frozen = "frozen", Inj = "inj", Bank = "bank", Eth = "eth", Staked = "staked", Reward = "reward", Funding = "funding", } export enum BinanceInstrument { Spot = "spot", Usdmf = "usdmf", } export enum BinanceUsdmfQuote { Usdt = "usdt", Busd = "busd", }