import { z } from 'zod'; declare enum BitfinexSort { ASC = "+1", DESC = "-1" } declare enum LedgersHistCategory { Exchange = 5, PositionModifiedClosedLiquidated = 22, PositionClaim = 23, PositionTransfer = 25, PositionSwap = 26, PositionFundingCostInterestCharged = 27, MarginSwapInterestPayment = 28, DerivativesFundingEvent = 29, Settlement = 31, Transfer = 51, Deposit = 101, Withdrawal = 104, CanceledWithdrawal = 105, TradingFee = 201, TradingRebate = 202, HiddenOrderFee = 204, OtcTradeFee = 207, SwapFee = 222, ClaimingFee = 224, UsedMarginFundingCharge = 226, UnusedMarginFundingFee = 228, EarnedFeeAffiliateRebate = 241, EthfxLoyaltyFee = 243, DepositFee = 251, WithdrawalFee = 254, WithdrawalExpressFee = 255, MinerFee = 258, StakingPayment = 262, Adjustment = 401, Expense = 501, CurrencyConversionComputationFee = 905, MonthlyProfitPayment = 907, Losses = 911 } declare enum PlatformStatus { MAINTENANCE = 0, OPERATIVE = 1 } declare enum V2ConfigRequest { 'pub:info:currency:restrict' = "pub:info:currency:restrict", 'pub:info:pair:fee:ovr' = "pub:info:pair:fee:ovr", 'pub:info:pair:restrict' = "pub:info:pair:restrict", 'pub:info:tx:status' = "pub:info:tx:status", 'pub:list:category:securities' = "pub:list:category:securities", 'pub:list:currency:futures' = "pub:list:currency:futures", 'pub:list:currency:margin' = "pub:list:currency:margin", 'pub:list:currency:paper' = "pub:list:currency:paper", 'pub:list:currency:securities:accredited' = "pub:list:currency:securities:accredited", 'pub:list:currency:securities:portfolio' = "pub:list:currency:securities:portfolio", 'pub:list:currency:securities' = "pub:list:currency:securities", 'pub:list:currency:stable' = "pub:list:currency:stable", 'pub:list:currency:viewonly' = "pub:list:currency:viewonly", 'pub:list:features' = "pub:list:features", 'pub:list:pair:cst' = "pub:list:pair:cst", 'pub:list:pair:exchange' = "pub:list:pair:exchange", 'pub:list:pair:futures' = "pub:list:pair:futures", 'pub:list:pair:margin' = "pub:list:pair:margin", 'pub:list:pair:securities' = "pub:list:pair:securities", 'pub:map:category:futures' = "pub:map:category:futures", 'pub:map:category:securities' = "pub:map:category:securities", 'pub:map:currency:explorer' = "pub:map:currency:explorer", 'pub:map:currency:label' = "pub:map:currency:label", 'pub:map:currency:pool' = "pub:map:currency:pool", 'pub:map:currency:support:securities' = "pub:map:currency:support:securities", 'pub:map:currency:support:zendesk' = "pub:map:currency:support:zendesk", 'pub:map:currency:sym' = "pub:map:currency:sym", 'pub:map:currency:tx:fee' = "pub:map:currency:tx:fee", 'pub:map:currency:unit' = "pub:map:currency:unit", 'pub:map:currency:wfx' = "pub:map:currency:wfx", 'pub:map:pair:sym' = "pub:map:pair:sym", 'pub:map:tx:method:pool' = "pub:map:tx:method:pool", 'pub:map:tx:method' = "pub:map:tx:method", 'pub:spec:futures' = "pub:spec:futures", 'pub:spec:margin' = "pub:spec:margin", 'pub:spec:site:maintenance' = "pub:spec:site:maintenance", 'pub:spec:ui_denom' = "pub:spec:ui_denom" } declare enum FundingAutoStatus { deactivate = 0, activate = 1 } type JsonValue = z.output; declare const ZodOutput$o: z.ZodArray; margin: z.ZodCoercedBoolean; maximum_order_size: z.ZodCoercedNumber; minimum_margin: z.ZodCoercedNumber; minimum_order_size: z.ZodCoercedNumber; pair: z.ZodString; price_precision: z.ZodCoercedNumber; }, z.core.$strip>>; type Output$o = z.output; declare const ZodInput$e: z.ZodObject<{ currency: z.ZodString; }, z.core.$strip>; type Input$e = z.input; declare const ZodOutput$n: z.ZodNullable>; type Output$n = z.output; declare const ZodInput$d: z.ZodObject<{ currency: z.ZodOptional; }, z.core.$strip>; type Input$d = z.input; declare const ZodOutput$m: z.ZodArray; id: z.ZodNumber; mtsCreate: z.ZodCoercedDate; mtsLastPayout: z.ZodCoercedDate; mtsOpening: z.ZodCoercedDate; mtsUpdate: z.ZodCoercedDate; noClose: z.ZodCoercedBoolean; notify: z.ZodCoercedBoolean; period: z.ZodNumber; positionPair: z.ZodString; rate: z.ZodNumber; rateType: z.ZodString; renew: z.ZodCoercedBoolean; side: z.ZodNumber; status: z.ZodString; symbol: z.ZodString; }, z.core.$strip>, z.ZodTransform<{ currency: string; amount: number; flags: z.core.util.JSONType; hidden: boolean; id: number; mtsCreate: Date; mtsLastPayout: Date; mtsOpening: Date; mtsUpdate: Date; noClose: boolean; notify: boolean; period: number; positionPair: string; rate: number; rateType: string; renew: boolean; side: number; status: string; symbol: string; }, { amount: number; flags: z.core.util.JSONType; hidden: boolean; id: number; mtsCreate: Date; mtsLastPayout: Date; mtsOpening: Date; mtsUpdate: Date; noClose: boolean; notify: boolean; period: number; positionPair: string; rate: number; rateType: string; renew: boolean; side: number; status: string; symbol: string; }>>>; type Output$m = z.output; declare const ZodInput$c: z.ZodObject<{ currency: z.ZodOptional; end: z.ZodOptional>>; limit: z.ZodDefault; start: z.ZodOptional>>; }, z.core.$strip>; type Input$c = z.input; declare const ZodOutput$l: z.ZodArray; id: z.ZodNumber; mtsCreate: z.ZodCoercedDate; mtsLastPayout: z.ZodCoercedDate; mtsOpening: z.ZodCoercedDate; mtsUpdate: z.ZodCoercedDate; noClose: z.ZodCoercedBoolean; notify: z.ZodCoercedBoolean; period: z.ZodNumber; positionPair: z.ZodString; rate: z.ZodNumber; rateType: z.ZodString; renew: z.ZodCoercedBoolean; side: z.ZodNumber; status: z.ZodString; symbol: z.ZodString; }, z.core.$strip>, z.ZodTransform<{ currency: string; amount: number; flags: z.core.util.JSONType; hidden: boolean; id: number; mtsCreate: Date; mtsLastPayout: Date; mtsOpening: Date; mtsUpdate: Date; noClose: boolean; notify: boolean; period: number; positionPair: string; rate: number; rateType: string; renew: boolean; side: number; status: string; symbol: string; }, { amount: number; flags: z.core.util.JSONType; hidden: boolean; id: number; mtsCreate: Date; mtsLastPayout: Date; mtsOpening: Date; mtsUpdate: Date; noClose: boolean; notify: boolean; period: number; positionPair: string; rate: number; rateType: string; renew: boolean; side: number; status: string; symbol: string; }>>>; type Output$l = z.output; declare const ZodInput$b: z.ZodObject<{ currency: z.ZodOptional; }, z.core.$strip>; type Input$b = z.input; declare const ZodOutput$k: z.ZodArray; id: z.ZodNumber; mtsCreate: z.ZodCoercedDate; mtsUpdate: z.ZodCoercedDate; notify: z.ZodCoercedBoolean; period: z.ZodNumber; rate: z.ZodNumber; renew: z.ZodCoercedBoolean; status: z.ZodString; symbol: z.ZodString; type: z.ZodString; }, z.core.$strip>, z.ZodTransform<{ currency: string; amount: number; amountOrig: number; flags: any; hidden: boolean; id: number; mtsCreate: Date; mtsUpdate: Date; notify: boolean; period: number; rate: number; renew: boolean; status: string; symbol: string; type: string; }, { amount: number; amountOrig: number; flags: any; hidden: boolean; id: number; mtsCreate: Date; mtsUpdate: Date; notify: boolean; period: number; rate: number; renew: boolean; status: string; symbol: string; type: string; }>>>; type Output$k = z.output; declare const ZodInput$a: z.ZodObject<{ currency: z.ZodOptional; end: z.ZodOptional>>; limit: z.ZodOptional; start: z.ZodOptional>>; }, z.core.$strip>; type Input$a = z.input; declare const ZodOutput$j: z.ZodArray; offerId: z.ZodNumber; period: z.ZodNumber; rate: z.ZodNumber; symbol: z.ZodString; }, z.core.$strip>, z.ZodTransform<{ currency: string; amount: number; id: number; mtsCreate: Date; offerId: number; period: number; rate: number; symbol: string; }, { amount: number; id: number; mtsCreate: Date; offerId: number; period: number; rate: number; symbol: string; }>>>; type Output$j = z.output; declare const ZodInput$9: z.ZodObject<{ currency: z.ZodDefault; }, z.core.$strip>; type Input$9 = z.input; declare const ZodOutput$i: z.ZodPipe, z.ZodTransform<{ currency: string; symbol: string; yieldLoan: number; yieldLend: number; durationLoan: number; durationLend: number; }, { symbol: string; yieldLoan: number; yieldLend: number; durationLoan: number; durationLend: number; }>>; type Output$i = z.output; declare const ZodOutput$h: z.ZodObject<{ company: z.ZodString; compCountries: z.ZodArray; compCountriesResid: z.ZodArray; competitionEnabled: z.ZodCoercedBoolean; complAccountType: z.ZodString; email: z.ZodString; id: z.ZodNumber; locale: z.ZodNullable; modes2FA: z.ZodArray; mtsAccountCreate: z.ZodCoercedDate; pptEnabled: z.ZodCoercedBoolean; timeLastLogin: z.ZodNullable>; timezone: z.ZodString; username: z.ZodString; ctxSwitch: z.ZodObject<{ allowDisable: z.ZodCoercedBoolean; disabled: z.ZodCoercedBoolean; }, z.core.$strip>; masterAccount: z.ZodObject<{ groupId: z.ZodNullable; groupWithdrawEnabled: z.ZodCoercedBoolean; id: z.ZodNullable; inheritVerification: z.ZodCoercedBoolean; isGroupMaster: z.ZodCoercedBoolean; mtsCreate: z.ZodNullable>; }, z.core.$strip>; merchant: z.ZodObject<{ enabled: z.ZodCoercedBoolean; isEnterprise: z.ZodCoercedBoolean; }, z.core.$strip>; securities: z.ZodObject<{ enabled: z.ZodCoercedBoolean; isElSalvador: z.ZodCoercedBoolean; isInvestorAccredited: z.ZodCoercedBoolean; isMaster: z.ZodCoercedBoolean; }, z.core.$strip>; verification: z.ZodObject<{ email: z.ZodCoercedBoolean; level: z.ZodNumber; levelSubmitted: z.ZodNumber; verified: z.ZodCoercedBoolean; }, z.core.$strip>; }, z.core.$strip>; type Output$h = z.output; declare const ZodInput$8: z.ZodObject<{ currency: z.ZodOptional; category: z.ZodOptional>; limit: z.ZodOptional; start: z.ZodOptional>>; end: z.ZodOptional>>; }, z.core.$strip>; type Input$8 = z.input; declare const ZodOutput$g: z.ZodArray; wallet: z.ZodNullable; }, z.core.$strip>>; type Output$g = z.output; declare const ZodOutput$f: z.ZodRecord; write: z.ZodCoercedBoolean; }, z.core.$strip>>; type Output$f = z.output; declare const ZodInput$7: z.ZodArray; type Input$7 = z.input; declare const ZodOutput$e: z.ZodRecord; type Output$e = z.output; declare const ZodOutput$d: z.ZodArray>; type Output$d = z.output; declare const ZodInput$6: z.ZodDiscriminatedUnion<[z.ZodObject<{ status: z.ZodLiteral; currency: z.ZodString; }, z.core.$strip>, z.ZodObject<{ status: z.ZodLiteral; currency: z.ZodString; period: z.ZodOptional; amount: z.ZodOptional>]>>; rate: z.ZodOptional>]>>; }, z.core.$strip>], "status">; type Input$6 = z.input; declare const ZodOutput$c: z.ZodObject<{ mts: z.ZodCoercedDate; type: z.ZodString; msgId: z.ZodNullable; offer: z.ZodNullable>; code: z.ZodNullable; status: z.ZodString; text: z.ZodString; }, z.core.$strip>; type Output$c = z.output; declare const ZodInput$5: z.ZodObject<{ currency: z.ZodOptional; }, z.core.$strip>; type Input$5 = z.input; declare const ZodOutput$b: z.ZodObject<{ mts: z.ZodCoercedDate; type: z.ZodString; status: z.ZodString; text: z.ZodString; }, z.core.$strip>; type Output$b = z.output; declare const ZodInput$4: z.ZodArray; type Input$4 = z.input; declare const ZodOutput$a: z.ZodObject<{ mts: z.ZodCoercedDate; type: z.ZodString; status: z.ZodString; }, z.core.$strip>; type Output$a = z.output; declare const ZodInput$3: z.ZodRecord; type Input$3 = z.input; declare const ZodOutput$9: z.ZodObject<{ mts: z.ZodCoercedDate; type: z.ZodString; affectedSettings: z.ZodNumber; status: z.ZodString; }, z.core.$strip>; type Output$9 = z.output; declare const ZodInputPair$3: z.ZodObject<{ timeframe: z.ZodDefault>; limit: z.ZodOptional; sort: z.ZodDefault>; start: z.ZodOptional>>; end: z.ZodOptional>>; pair: z.ZodString; }, z.core.$strip>; type InputPair$3 = z.input; declare const ZodInputCurrencyPeriod1$1: z.ZodObject<{ timeframe: z.ZodDefault>; limit: z.ZodOptional; sort: z.ZodDefault>; start: z.ZodOptional>>; end: z.ZodOptional>>; currency: z.ZodString; period: z.ZodPipe>; }, z.core.$strip>; type InputCurrencyPeriod1$1 = z.input; declare const ZodInputCurrencyPeriod2$1: z.ZodPipe>; limit: z.ZodOptional; sort: z.ZodDefault>; start: z.ZodOptional>>; end: z.ZodOptional>>; currency: z.ZodString; aggregation: z.ZodDefault, z.ZodLiteral<30>]>>; periodEnd: z.ZodNumber; periodStart: z.ZodNumber; }, z.core.$strip>, z.ZodTransform<{ period: string; timeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "3h" | "6h" | "12h" | "1D" | "1W" | "14D" | "1M"; sort: BitfinexSort; currency: string; limit?: number | undefined; start?: number | undefined; end?: number | undefined; }, { timeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "3h" | "6h" | "12h" | "1D" | "1W" | "14D" | "1M"; sort: BitfinexSort; currency: string; aggregation: 10 | 30; periodEnd: number; periodStart: number; limit?: number | undefined; start?: number | undefined; end?: number | undefined; }>>; type InputCurrencyPeriod2$1 = z.input; declare const ZodOutput$8: z.ZodArray; open: z.ZodNumber; close: z.ZodNumber; high: z.ZodNumber; low: z.ZodNumber; volume: z.ZodNumber; }, z.core.$strip>>; type Output$8 = z.output; declare const ZodInputPair$2: z.ZodObject<{ timeframe: z.ZodDefault>; sort: z.ZodDefault>; start: z.ZodOptional>>; end: z.ZodOptional>>; pair: z.ZodString; }, z.core.$strip>; type InputPair$2 = z.input; declare const ZodInputCurrencyPeriod1: z.ZodObject<{ timeframe: z.ZodDefault>; sort: z.ZodDefault>; start: z.ZodOptional>>; end: z.ZodOptional>>; currency: z.ZodString; period: z.ZodPipe>; }, z.core.$strip>; type InputCurrencyPeriod1 = z.input; declare const ZodInputCurrencyPeriod2: z.ZodPipe>; sort: z.ZodDefault>; start: z.ZodOptional>>; end: z.ZodOptional>>; currency: z.ZodString; aggregation: z.ZodDefault, z.ZodLiteral<30>]>>; periodEnd: z.ZodNumber; periodStart: z.ZodNumber; }, z.core.$strip>, z.ZodTransform<{ period: string; timeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "3h" | "6h" | "12h" | "1D" | "1W" | "14D" | "1M"; sort: BitfinexSort; currency: string; start?: number | undefined; end?: number | undefined; }, { timeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "3h" | "6h" | "12h" | "1D" | "1W" | "14D" | "1M"; sort: BitfinexSort; currency: string; aggregation: 10 | 30; periodEnd: number; periodStart: number; start?: number | undefined; end?: number | undefined; }>>; type InputCurrencyPeriod2 = z.input; declare const ZodOutput$7: z.ZodObject<{ mts: z.ZodCoercedDate; open: z.ZodNumber; close: z.ZodNumber; high: z.ZodNumber; low: z.ZodNumber; volume: z.ZodNumber; }, z.core.$strip>; type Output$7 = z.output; declare const ZodInput$2: z.ZodObject<{ currency: z.ZodDefault; start: z.ZodOptional>>; end: z.ZodOptional>>; limit: z.ZodOptional; }, z.core.$strip>; type Input$2 = z.input; declare const ZodOutput$6: z.ZodArray; frrDiv365: z.ZodNumber; avgPeriod: z.ZodNumber; amount: z.ZodNumber; amountUsed: z.ZodNumber; belowThreshold: z.ZodNumber; }, z.core.$strip>, z.ZodTransform<{ frr: number; apr: number; mts: Date; frrDiv365: number; avgPeriod: number; amount: number; amountUsed: number; belowThreshold: number; }, { mts: Date; frrDiv365: number; avgPeriod: number; amount: number; amountUsed: number; belowThreshold: number; }>>>; type Output$6 = z.output; declare const ZodOutput$5: z.ZodObject<{ area: z.ZodNumber; city: z.ZodString; country: z.ZodString; eu: z.ZodPipe>; ip: z.ZodString; ll: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>; metro: z.ZodNumber; range: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>; region: z.ZodString; timezone: z.ZodString; }, z.core.$strip>; type Output$5 = z.output; declare const ZodOutput$4: z.ZodObject<{ status: z.ZodEnum; }, z.core.$strip>; type Output$4 = z.output; declare const ZodInputPair$1: z.ZodPipe, z.ZodTransform>; type InputPair$1 = z.input; declare const ZodInputCurrency$1: z.ZodPipe, z.ZodTransform>; type InputCurrency$1 = z.input; declare const ZodInputSymbol$1: z.ZodPipe, z.ZodTransform>; type InputSymbol$1 = z.input; declare const ZodOutputPair: z.ZodPipe, z.ZodTransform<{ pair: string; symbol: string; bidPrice: number; bidSize: number; askPrice: number; askSize: number; dailyChange: number; dailyChangeRelative: number; lastPrice: number; volume: number; high: number; low: number; }, { symbol: string; bidPrice: number; bidSize: number; askPrice: number; askSize: number; dailyChange: number; dailyChangeRelative: number; lastPrice: number; volume: number; high: number; low: number; }>>; type OutputPair = z.output; declare const ZodOutputCurrency: z.ZodPipe, z.ZodTransform<{ currency: string; dpr: number; apr: number; symbol: string; frr: number; bidPrice: number; bidPeriod: number; bidSize: number; askPrice: number; askPeriod: number; askSize: number; dailyChange: number; dailyChangePerc: number; lastPrice: number; volume: number; high: number; low: number; frrAmountAvailable: number; }, { symbol: string; frr: number; bidPrice: number; bidPeriod: number; bidSize: number; askPrice: number; askPeriod: number; askSize: number; dailyChange: number; dailyChangePerc: number; lastPrice: number; volume: number; high: number; low: number; frrAmountAvailable: number; }>>; type OutputCurrency = z.output; declare const ZodOutput$3: z.ZodUnion, z.ZodTransform<{ pair: string; symbol: string; bidPrice: number; bidSize: number; askPrice: number; askSize: number; dailyChange: number; dailyChangeRelative: number; lastPrice: number; volume: number; high: number; low: number; }, { symbol: string; bidPrice: number; bidSize: number; askPrice: number; askSize: number; dailyChange: number; dailyChangeRelative: number; lastPrice: number; volume: number; high: number; low: number; }>>, z.ZodPipe, z.ZodTransform<{ currency: string; dpr: number; apr: number; symbol: string; frr: number; bidPrice: number; bidPeriod: number; bidSize: number; askPrice: number; askPeriod: number; askSize: number; dailyChange: number; dailyChangePerc: number; lastPrice: number; volume: number; high: number; low: number; frrAmountAvailable: number; }, { symbol: string; frr: number; bidPrice: number; bidPeriod: number; bidSize: number; askPrice: number; askPeriod: number; askSize: number; dailyChange: number; dailyChangePerc: number; lastPrice: number; volume: number; high: number; low: number; frrAmountAvailable: number; }>>]>; type Output$3 = z.output; declare const ZodInput$1: z.ZodObject<{ symbols: z.ZodDefault, z.ZodTransform>, z.ZodString]>>; }, z.core.$strip>; type Input$1 = z.input; declare const ZodOutput$2: z.ZodArray, z.ZodTransform<{ pair: string; symbol: string; bidPrice: number; bidSize: number; askPrice: number; askSize: number; dailyChange: number; dailyChangeRelative: number; lastPrice: number; volume: number; high: number; low: number; }, { symbol: string; bidPrice: number; bidSize: number; askPrice: number; askSize: number; dailyChange: number; dailyChangeRelative: number; lastPrice: number; volume: number; high: number; low: number; }>>, z.ZodPipe, z.ZodTransform<{ currency: string; dpr: number; apr: number; symbol: string; frr: number; bidPrice: number; bidPeriod: number; bidSize: number; askPrice: number; askPeriod: number; askSize: number; dailyChange: number; dailyChangePerc: number; lastPrice: number; volume: number; high: number; low: number; frrAmountAvailable: number; }, { symbol: string; frr: number; bidPrice: number; bidPeriod: number; bidSize: number; askPrice: number; askPeriod: number; askSize: number; dailyChange: number; dailyChangePerc: number; lastPrice: number; volume: number; high: number; low: number; frrAmountAvailable: number; }>>]>>; type Output$2 = z.output; declare const ZodInput: z.ZodObject<{ symbols: z.ZodDefault, z.ZodTransform>, z.ZodString]>>; start: z.ZodOptional>>; end: z.ZodOptional>>; limit: z.ZodDefault; }, z.core.$strip>; type Input = z.input; declare const ZodOutput$1: z.ZodArray; }, z.core.$strip>, z.ZodTransform<{ pair?: string | undefined; symbol: string; bidPrice: number; askPrice: number; mts: Date; }, { symbol: string; bidPrice: number; askPrice: number; mts: Date; }>>>; type Output$1 = z.output; declare const ZodInputPair: z.ZodPipe>>; limit: z.ZodDefault; sort: z.ZodDefault>; start: z.ZodOptional>>; pair: z.ZodString; }, z.core.$strip>, z.ZodTransform<{ symbol: string; limit: number; sort: BitfinexSort; pair: string; end?: number | undefined; start?: number | undefined; }, { limit: number; sort: BitfinexSort; pair: string; end?: number | undefined; start?: number | undefined; }>>; type InputPair = z.input; declare const ZodInputCurrency: z.ZodPipe>>; limit: z.ZodDefault; sort: z.ZodDefault>; start: z.ZodOptional>>; currency: z.ZodString; }, z.core.$strip>, z.ZodTransform<{ symbol: string; limit: number; sort: BitfinexSort; currency: string; end?: number | undefined; start?: number | undefined; }, { limit: number; sort: BitfinexSort; currency: string; end?: number | undefined; start?: number | undefined; }>>; type InputCurrency = z.input; declare const ZodInputSymbol: z.ZodObject<{ end: z.ZodOptional>>; limit: z.ZodDefault; sort: z.ZodDefault>; start: z.ZodOptional>>; symbol: z.ZodString; }, z.core.$strip>; type InputSymbol = z.input; declare const ZodOutputPairs: z.ZodArray; price: z.ZodNumber; }, z.core.$strip>>; type OutputPairs = z.output; declare const ZodOutputCurrencys: z.ZodArray; period: z.ZodNumber; rate: z.ZodNumber; }, z.core.$strip>>; type OutputCurrencys = z.output; declare const ZodOutput: z.ZodUnion; price: z.ZodNumber; }, z.core.$strip>>, z.ZodArray; period: z.ZodNumber; rate: z.ZodNumber; }, z.core.$strip>>]>; type Output = z.output; declare class Bitfinex { #private; constructor(opts: { affCode?: string; apiKey?: string; apiSecret?: string; authToken?: string; }); /** * 取得目前 Bitfinex 平台的運作狀態。維護狀態通常會持續幾分鐘到幾小時,並且在基礎設施升級期間也有可能進入維護狀態。 * * 當平台標記為維護模式時,機器人應停止所有交易活動。在維護模式時可能會無法取消訂單和下單。 * @group v2 * @returns * - status: operative = 1, maintenance = 0 * @see [Platform Status | BitFinex API](https://docs.bitfinex.com/reference/rest-public-platform-status) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2PlatformStatus()) // Expected output: { status: 1 } * ``` */ static v2PlatformStatus(): Promise; /** * 取得指定交易對目前的行情概覽。它會回傳當前最佳買入價和賣出價、最近成交價,以及昨日至今的每日成交量和價格變動資訊。 * @group v2 * @param opts - 參數說明 * - pair: 交易對代碼 * @returns * - symbol: 交易對代碼 * - pair: 交易對代碼 * - bidPrice: 最高的買入價 * - bidSize: 最高的 25 個買入價總數量 * - askPrice: 最低的賣出價 * - askSize: 最低的 25 個賣出價總數量 * - dailyChange: 昨日至今的價格變化量 * - dailyChangeRelative: 昨日至今的相對價格變化(乘以 100 即為百分比變化) * - lastPrice: 最新成交價 * - volume: 昨日至今的成交量 * - high: 昨日至今的最高價 * - low: 昨日至今的最低價 * @see [Ticker | BitFinex API](https://docs.bitfinex.com/reference/rest-public-ticker) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2Ticker({ pair: 'BTCUSD' })) * /* Expected output: * { * symbol: 'tBTCUSD', * bidPrice: 82388, * bidSize: 10.16663748, * askPrice: 82389, * askSize: 4.73069672, * dailyChange: -1154, * dailyChangeRelative: -0.01381821, * lastPrice: 82359, * volume: 715.62902556, * high: 83697, * low: 81481, * pair: 'BTCUSD' * } * *\/ * ``` */ static v2Ticker(opts: InputPair$1): Promise; /** * 取得指定融資貨幣目前的行情概覽。它會回傳當前最佳買入價和賣出價、最近成交價,以及昨日至今的每日成交量和價格變動資訊。 * @group v2 * @param opts - 參數說明 * - currency: 貨幣代碼 * @returns * - symbol: 融資代碼 * - currency: 貨幣代碼 * - frr: [Flash Return Rate](https://support.bitfinex.com/hc/en-us/articles/213919009-What-is-the-Bitfinex-Funding-Flash-Return-Rate) * - dpr: Daily Percentage Rate,由公式 `frr * 100` 計算產生 * - apr: Annual Percentage Rate,由公式 `frr * 100 * 365` 計算產生 * - bidPrice: 最高的貸款利率 * - bidPeriod: 最高貸款利率的天數 * - bidSize: 最高的 25 個貸款利率的總數量 * - askPrice: 最低的放款利率 * - askPeriod: 最低放款利率的天數 * - askSize: 最低的 25 個放款利率的總數量 * - dailyChange: 昨日至今的利率變化量 * - dailyChangePerc: 昨日至今的相對利率變化(乘以 100 即為百分比變化) * - lastPrice: 最新成交利率 * - volume: 昨日至今的成交量 * - high: 昨日至今的最高利率 * - low: 昨日至今的最低利率 * - frrAmountAvailable: 以 FRR 進行貸款或放款的數量 * @see [Ticker | BitFinex API](https://docs.bitfinex.com/reference/rest-public-ticker) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2Ticker({ currency: 'USD' })) * /* Expected output: * { * symbol: 'fUSD', * frr: 0.0003347671232876712, * bidPrice: 0.0003347671232876712, * bidPeriod: 30, * bidSize: 33194024.88639909, * askPrice: 0.0001639, * askPeriod: 2, * askSize: 42436.36607463, * dailyChange: -9.1e-7, * dailyChangePerc: -0.0061, * lastPrice: 0.00014799, * volume: 143727499.90044996, * high: 0.00059907, * low: 0.00007945, * frrAmountAvailable: 45904.65709059, * currency: 'USD', * dpr: 0.03347671, * apr: 12.219 * } * *\/ * ``` */ static v2Ticker(opts: InputCurrency$1): Promise; /** * 取得指定交易對或融資貨幣目前的行情概覽。它會回傳當前最佳買入價和賣出價、最近成交價,以及昨日至今的每日成交量和價格變動資訊。 * @group v2 * @param opts - 參數說明 * - symbol: 交易對或融資貨幣 * @returns * - 交易對的行情概覽欄位 * - symbol: 交易對代碼 * - pair: 交易對代碼 * - bidPrice: 最高的買入價 * - bidSize: 最高的 25 個買入價總數量 * - askPrice: 最低的賣出價 * - askSize: 最低的 25 個賣出價總數量 * - dailyChange: 昨日至今的價格變化量 * - dailyChangeRelative: 昨日至今的相對價格變化(乘以 100 即為百分比變化) * - lastPrice: 最新成交價 * - volume: 昨日至今的成交量 * - high: 昨日至今的最高價 * - low: 昨日至今的最低價 * - 融資的行情概覽欄位 * - symbol: 融資代碼 * - currency: 貨幣代碼 * - frr: [Flash Return Rate](https://support.bitfinex.com/hc/en-us/articles/213919009-What-is-the-Bitfinex-Funding-Flash-Return-Rate) * - dpr: Daily Percentage Rate,由公式 `frr * 100` 計算產生 * - apr: Annual Percentage Rate,由公式 `frr * 100 * 365` 計算產生 * - bidPrice: 最高的貸款利率 * - bidPeriod: 最高貸款利率的天數 * - bidSize: 最高的 25 個貸款利率的總數量 * - askPrice: 最低的放款利率 * - askPeriod: 最低放款利率的天數 * - askSize: 最低的 25 個放款利率的總數量 * - dailyChange: 昨日至今的利率變化量 * - dailyChangePerc: 昨日至今的相對利率變化(乘以 100 即為百分比變化) * - lastPrice: 最新成交利率 * - volume: 昨日至今的成交量 * - high: 昨日至今的最高利率 * - low: 昨日至今的最低利率 * - frrAmountAvailable: 以 FRR 進行貸款或放款的數量 * @see [Ticker | BitFinex API](https://docs.bitfinex.com/reference/rest-public-ticker) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2Ticker({ symbol: 'tBTCUSD' })) * console.log(await Bitfinex.v2Ticker({ symbol: 'fUSD' })) * ``` */ static v2Ticker(opts: InputSymbol$1): Promise; /** * 取得交易對以及融資目前的行情概覽。它會回傳當前最佳買入價和賣出價、最近成交價,以及昨日至今的每日成交量和價格變動資訊。這個 API 允許同時取得多個交易對及融資的行情資訊。 * @group v2 * @param opts - 參數說明 * - symbols: 交易對或融資貨幣的陣列,或指定 ALL 取得全部的行情概覽,預設為 `ALL`。 * @returns * - 交易對的行情概覽欄位 * - symbol: 交易對代碼 * - pair: 交易對代碼 * - bidPrice: 最高的買入價 * - bidSize: 最高的 25 個買入價總數量 * - askPrice: 最低的賣出價 * - askSize: 最低的 25 個賣出價總數量 * - dailyChange: 昨日至今的價格變化量 * - dailyChangeRelative: 昨日至今的相對價格變化(乘以 100 即為百分比變化) * - lastPrice: 最新成交價 * - volume: 昨日至今的成交量 * - high: 昨日至今的最高價 * - low: 昨日至今的最低價 * - 融資的行情概覽欄位 * - symbol: 融資代碼 * - currency: 貨幣代碼 * - frr: [Flash Return Rate](https://support.bitfinex.com/hc/en-us/articles/213919009-What-is-the-Bitfinex-Funding-Flash-Return-Rate) * - dpr: Daily Percentage Rate,由公式 `frr * 100` 計算產生 * - apr: Annual Percentage Rate,由公式 `frr * 100 * 365` 計算產生 * - bidPrice: 最高的貸款利率 * - bidPeriod: 最高貸款利率的天數 * - bidSize: 最高的 25 個貸款利率的總數量 * - askPrice: 最低的放款利率 * - askPeriod: 最低放款利率的天數 * - askSize: 最低的 25 個放款利率的總數量 * - dailyChange: 昨日至今的利率變化量 * - dailyChangePerc: 昨日至今的相對利率變化(乘以 100 即為百分比變化) * - lastPrice: 最新成交利率 * - volume: 昨日至今的成交量 * - high: 昨日至今的最高利率 * - low: 昨日至今的最低利率 * - frrAmountAvailable: 以 FRR 進行貸款或放款的數量 * @see [Tickers | BitFinex API](https://docs.bitfinex.com/reference/rest-public-tickers) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2Tickers()) // default: ALL symbols * console.log(await Bitfinex.v2Tickers({ symbols: 'fUSD' })) * console.log(await Bitfinex.v2Tickers({ symbols: ['tBTCUSD', 'fUSD'] })) * /* Expected output: * [ * { * symbol: 'tBTCUSD', * bidPrice: 82254, * bidSize: 8.81387677, * askPrice: 82255, * askSize: 7.91928646, * dailyChange: -1272, * dailyChangeRelative: -0.01523116, * lastPrice: 82241, * volume: 716.48201682, * high: 83697, * low: 81481, * pair: 'BTCUSD' * }, * { * symbol: 'fUSD', * frr: 0.0003347671232876712, * bidPrice: 0.0003347671232876712, * bidPeriod: 30, * bidSize: 33193866.53816909, * askPrice: 0.00035676, * askPeriod: 4, * askSize: 442678.99810842, * dailyChange: 0.0002188, * dailyChangePerc: 1.4694, * lastPrice: 0.0003677, * volume: 144225957.2861548, * high: 0.00059907, * low: 0.00007945, * frrAmountAvailable: 0, * currency: 'USD', * dpr: 0.03347671, * apr: 12.219 * } * ] * *\/ * ``` */ static v2Tickers(opts?: Input$1): Promise; /** * 取得指定交易對行情概覽的歷史記錄,它會回傳以小時為單位的最佳買入價及賣出價。 * @group v2 * @param opts - 參數說明 * - symbols: 交易對的陣列,或指定 ALL 取得全部的行情概覽,預設為 `ALL`。目前不支援融資貨幣。 * - start: 回傳的記錄中,`mts` 欄位不小於此值 * - end: 回傳的記錄中,`mts` 欄位不大於此值 * - limit: 回傳的記錄數量上限,最大 `250`,預設為 `125` * @returns * - symbol: 交易對代碼 * - pair: 交易對代碼 * - bidPrice: 最高的買入價 * - askPrice: 最低的賣出價 * - mts: 記錄的時間 * @see [Tickers History | BitFinex API](https://docs.bitfinex.com/reference/rest-public-tickers-history) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2TickersHist()) // default: ALL symbols * console.log(await Bitfinex.v2TickersHist({ symbols: ['tBTCUSD', 'tETHUSD'], limit: 2 })) * console.log(await Bitfinex.v2TickersHist({ symbols: 'tBTCUSD', limit: 2 })) * /* Expected output: * [ * { * symbol: 'tBTCUSD', * bidPrice: 82201, * askPrice: 82202, * mts: 2025-03-31T07:00:03.000Z, * pair: 'BTCUSD' * }, * { * symbol: 'tBTCUSD', * bidPrice: 82345, * askPrice: 82346, * mts: 2025-03-31T06:00:03.000Z, * pair: 'BTCUSD' * } * ] * *\/ * ``` */ static v2TickersHist(opts?: Input): Promise; /** * 取得指定交易對的成交記錄。 * @group v2/trades * @param opts - 參數說明 * - pair: 交易對代碼 * - limit: 回傳的交易記錄數量上限,最大 `10000`,預設為 `125` * - sort: 根據 `mts` 欄位將交易記錄以指定的方式進行排序,預設為 `BitfinexSort.DESC` * - start: 回傳的交易記錄中,`mts` 欄位不小於此值 * - end: 回傳的交易記錄中,`mts` 欄位不大於此值 * @returns * - id: 交易 ID * - mts: 成交時間 * - amount: 成交數量,買入為正,賣出為負。 * - price: 成交價格 * @see [Trades | BitFinex API](https://docs.bitfinex.com/reference/rest-public-trades) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2TradesHist({ pair: 'BTCUSD', limit: 1 })) * /* Expected output: * [ * { * amount: 0.00014115, * id: 1744148660, * mts: 2025-03-31T07:28:25.296Z, * price: 82139 * } * ] * *\/ * ``` */ static v2TradesHist(opts: InputPair): Promise; /** * 取得指定融資的成交記錄。 * @group v2/trades * @param opts - 參數說明 * - currency: 貨幣代碼 * - limit: 回傳的交易記錄數量上限,最大 `10000`,預設為 `125` * - sort: 根據 `mts` 欄位將交易記錄以指定的方式進行排序,預設為 `BitfinexSort.DESC` * - start: 回傳的交易記錄中,`mts` 欄位不小於此值 * - end: 回傳的交易記錄中,`mts` 欄位不大於此值 * @returns * - id: 交易 ID * - mts: 成交時間 * - amount: 成交數量,買入為正,賣出為負。 * - rate: 融資成交利率 * - peroid: 融資天數 * @see [Trades | BitFinex API](https://docs.bitfinex.com/reference/rest-public-trades) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2TradesHist({ currency: 'USD', limit: 1 })) * /* Expected output: * [ * { * amount: -4639.47753284, * id: 356901557, * mts: 2025-03-31T07:30:32.482Z, * period: 2, * rate: 0.00015 * } * ] * *\/ * ``` */ static v2TradesHist(opts: InputCurrency): Promise; /** * 取得指定交易對或融資的成交記錄。 * @group v2/trades * @param opts - 參數說明 * - symbol: 交易對或融資代碼 * - limit: 回傳的交易記錄數量上限,最大 `10000`,預設為 `125` * - sort: 根據 `mts` 欄位將交易記錄以指定的方式進行排序,預設為 `BitfinexSort.DESC` * - start: 回傳的交易記錄中,`mts` 欄位不小於此值 * - end: 回傳的交易記錄中,`mts` 欄位不大於此值 * @returns * - 如果 symbol 是交易對代碼時: * - id: 交易 ID * - mts: 成交時間 * - amount: 成交數量,買入為正,賣出為負。 * - price: 成交價格 * - 如果 symbol 是融資代碼時: * - id: 交易 ID * - mts: 成交時間 * - amount: 成交數量,買入為正,賣出為負。 * - rate: 融資成交利率 * - peroid: 融資天數 * @see [Trades | BitFinex API](https://docs.bitfinex.com/reference/rest-public-trades) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2TradesHist({ symbol: 'fUSD', limit: 1 })) * console.log(await Bitfinex.v2TradesHist({ symbol: 'tBTCUSD', limit: 1 })) * ``` */ static v2TradesHist(opts: InputSymbol): Promise; /** * 取得指定交易對 `pair` 的歷史 K 棒。 * @group v2/candles * @param opts - 參數說明 * - timeframe: 時間框架,預設為 `1h` * - pair: 交易對代碼,預設為 `BTCUSD` * - limit: 資料筆數的上限,最大 `10000` * - sort: 根據 `mts` 欄位將交易記錄以指定的方式進行排序,預設為 `BitfinexSort.DESC` * - start: 回傳的交易記錄中,`mts` 欄位不小於此值 * - end: 回傳的交易記錄中,`mts` 欄位不大於此值 * @returns * - mts: 成交時間 * - open: 開盤價 * - close: 收盤價 * - high: 最高價 * - low: 最低價 * - volume: 成交量 * @see [Candles | BitFinex API](https://docs.bitfinex.com/reference/rest-public-candles) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2CandlesHist({ pair: 'BTCUSD', timeframe: '1h', limit: 1 })) * /* Expected output: * [ * { * mts: 2025-03-31T08:00:00.000Z, * open: 82073, * close: 82206, * high: 82388, * low: 82073, * volume: 1.84279286 * } * ] * *\/ * ``` */ static v2CandlesHist(opts: InputPair$3): Promise; /** * 取得指定融資貨幣 `currency` 的歷史 K 棒。 * @group v2/candles * @param opts - 參數說明 * - timeframe: 時間框架,預設為 `1h` * - currency: 貨幣代碼,預設為 `USD` * - period: 融資天數,預設為 2 * - limit: 資料筆數的上限,最大 `10000` * - sort: 根據 `mts` 欄位將交易記錄以指定的方式進行排序,預設為 `BitfinexSort.DESC` * - start: 回傳的交易記錄中,`mts` 欄位不小於此值 * - end: 回傳的交易記錄中,`mts` 欄位不大於此值 * @returns * - mts: 成交時間 * - open: 開盤利率 * - close: 收盤利率 * - high: 最高利率 * - low: 最低利率 * - volume: 成交量 * @see [Candles | BitFinex API](https://docs.bitfinex.com/reference/rest-public-candles) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2CandlesHist({ currency: 'USD', timeframe: '1h', period: 2, limit: 1 })) * /* Expected output: * [ * { * mts: 2025-03-31T08:00:00.000Z, * open: 0.00025, * close: 0.00042729, * high: 0.00042729, * low: 0.00025, * volume: 79474.06069641 * } * ] * *\/ * ``` */ static v2CandlesHist(opts: InputCurrencyPeriod1$1): Promise; /** * 取得指定融資貨幣 `currency` 的歷史 K 棒。 * @group v2/candles * @param opts - 參數說明 * - timeframe: 時間框架,預設為 `1h` * - currency: 貨幣代碼,預設為 `USD` * - periodStart: 融資天數的開始範圍 * - periodEnd: 融資天數的結束範圍 * - aggregation: 資料聚合的方式,可指定 `10` 或 `30`,預設為 `30` * - limit: 資料筆數的上限,最大 `10000` * - sort: 根據 `mts` 欄位將交易記錄以指定的方式進行排序,預設為 `BitfinexSort.DESC` * - start: 回傳的交易記錄中,`mts` 欄位不小於此值 * - end: 回傳的交易記錄中,`mts` 欄位不大於此值 * @returns * - mts: 成交時間 * - open: 開盤利率 * - close: 收盤利率 * - high: 最高利率 * - low: 最低利率 * - volume: 成交量 * @see [Candles | BitFinex API](https://docs.bitfinex.com/reference/rest-public-candles) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2CandlesHist({ currency: 'USD', timeframe: '1h', periodStart: 2, periodEnd: 30, aggregation: 30, limit: 1 })) * /* Expected output: * [ * { * mts: 2025-03-31T08:00:00.000Z, * open: 0.00025, * close: 0.0004273, * high: 0.0004273, * low: 0.00025, * volume: 255358.55160453 * } * ] * *\/ * ``` */ static v2CandlesHist(opts: InputCurrencyPeriod2$1): Promise; /** * 取得指定交易對 `pair` 的最新 K 棒。 * @group v2/candles * @param opts - 參數說明 * - timeframe: 時間框架,預設為 `1h` * - pair: 交易對代碼,預設為 `BTCUSD` * - sort: 根據 `mts` 欄位將交易記錄以指定的方式進行排序,預設為 `BitfinexSort.DESC` * - start: 回傳的交易記錄中,`mts` 欄位不小於此值 * - end: 回傳的交易記錄中,`mts` 欄位不大於此值 * @returns * - mts: 成交時間 * - open: 開盤價 * - close: 收盤價 * - high: 最高價 * - low: 最低價 * - volume: 成交量 * @see [Candles | BitFinex API](https://docs.bitfinex.com/reference/rest-public-candles) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2CandlesLast({ pair: 'BTCUSD', timeframe: '1h' })) * /* Expected output: * { * mts: 2025-03-31T08:00:00.000Z, * open: 82073, * close: 82381, * high: 82388, * low: 82073, * volume: 1.71526122 * } * *\/ * ``` */ static v2CandlesLast(opts: InputPair$2): Promise; /** * 取得指定融資貨幣 `currency` 的最新 K 棒。 * @group v2/candles * @param opts - 參數說明 * - timeframe: 時間框架,預設為 `1h` * - currency: 貨幣代碼,預設為 `USD` * - period: 融資天數,預設為 2 * - sort: 根據 `mts` 欄位將交易記錄以指定的方式進行排序,預設為 `BitfinexSort.DESC` * - start: 回傳的交易記錄中,`mts` 欄位不小於此值 * - end: 回傳的交易記錄中,`mts` 欄位不大於此值 * @returns * - mts: 成交時間 * - open: 開盤利率 * - close: 收盤利率 * - high: 最高利率 * - low: 最低利率 * - volume: 成交量 * @see [Candles | BitFinex API](https://docs.bitfinex.com/reference/rest-public-candles) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2CandlesLast({ currency: 'USD', timeframe: '1h', period: 2 })) * /* Expected output: * { * mts: 2025-03-31T08:00:00.000Z, * open: 0.00025, * close: 0.00042729, * high: 0.00042729, * low: 0.00025, * volume: 79474.06069641 * } * *\/ * ``` */ static v2CandlesLast(opts: InputCurrencyPeriod1): Promise; /** * 取得指定融資貨幣 `currency` 的最新 K 棒。 * @group v2/candles * @param opts - 參數說明 * - timeframe: 時間框架,預設為 `1h` * - currency: 貨幣代碼,預設為 `USD` * - periodStart: 融資天數的開始範圍 * - periodEnd: 融資天數的結束範圍 * - aggregation: 資料聚合的方式,可指定 `10` 或 `30`,預設為 `30` * - sort: 根據 `mts` 欄位將交易記錄以指定的方式進行排序,預設為 `BitfinexSort.DESC` * - start: 回傳的交易記錄中,`mts` 欄位不小於此值 * - end: 回傳的交易記錄中,`mts` 欄位不大於此值 * @returns * - mts: 成交時間 * - open: 開盤利率 * - close: 收盤利率 * - high: 最高利率 * - low: 最低利率 * - volume: 成交量 * @see [Candles | BitFinex API](https://docs.bitfinex.com/reference/rest-public-candles) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2CandlesLast({ currency: 'USD', timeframe: '1h', periodStart: 2, periodEnd: 30, aggregation: 30 })) * /* Expected output: * { * mts: 2025-03-31T08:00:00.000Z, * open: 0.00025, * close: 0.0004273, * high: 0.0004273, * low: 0.00025, * volume: 255358.55160453 * } * *\/ * ``` */ static v2CandlesLast(opts: InputCurrencyPeriod2): Promise; /** * 取得所有的 Bifinex 設定檔 (此設定檔與使用者無關)。 * @group v2 * @returns Bifinex 所有設定檔的內容。 * @see [Configs | BitFinex API](https://docs.bitfinex.com/reference/rest-public-conf) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2Config()) * ``` */ static v2Config(): Promise>; /** * 取得指定的 Bifinex 設定檔 (此設定檔與使用者無關)。 * @group v2 * @param req - 設定檔的名稱。 * @returns Bifinex 設定檔的內容。 * @see [Configs | BitFinex API](https://docs.bitfinex.com/reference/rest-public-conf) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2Config('pub:spec:site:maintenance')) * /* Expected output: * { * id: 'maintenance-march-06-2023', * start: '2023-03-06 09:00:00', * duration: 6, * url: 'https://blog.bitfinex.com/?p=21173' * } * *\/ * ``` */ static v2Config(req: V2ConfigRequest): Promise; /** * 取得指定的 Bifinex 設定檔。 * @group v2 * @param reqs - 設定檔名稱的陣列。 * @returns Bifinex 設定檔的內容。 * @see [Configs | BitFinex API](https://docs.bitfinex.com/reference/rest-public-conf) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2Config(['pub:spec:site:maintenance', 'pub:list:category:securities'])) * /* Expected output: * { * 'pub:spec:site:maintenance': { * id: 'maintenance-march-06-2023', * start: '2023-03-06 09:00:00', * duration: 6, * url: 'https://blog.bitfinex.com/?p=21173' * }, * 'pub:list:category:securities': [ * [ * 'aifc', * 'AIFC', * 'ALT2612:USD', * 'AIFC', * 'Bitfinex Securities Ltd.' * ], * [ * 'el_salvador', * 'El Salvador', * 'USTBL:UST', * 'El-Salvador', * 'Bitfinex Securities El Salvador, S.A. de C.V.' * ] * ] * } * *\/ * ``` */ static v2Config(reqs: TReq[]): Promise>; /** * 取得 Bitfinex 所有交易對的詳細資訊。 * @group v1 * @returns * - pair: 交易對代碼 * - price_precision: 價格小數點精確度 * - initial_margin: 初始保證金百分比 * - minimum_margin: 最低保證金百分比 * - maximum_order_size: 最大訂單量 * - minimum_order_size: 最小訂單量 * - expiration: 過期時間 * - margin: 保證金交易是否可用 * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log((await Bitfinex.v1SymbolsDetails())[0]) * /* Expected output: * { * expiration: 'NA', * initial_margin: 10, * margin: true, * maximum_order_size: 2000, * minimum_margin: 5, * minimum_order_size: 0.00004, * pair: 'btcusd', * price_precision: 5 * } * *\/ * ``` */ static v1SymbolsDetails(): Promise; /** * 取得指定貨幣最近的融資統計記錄 * @group v2/funding * @param opts - 參數說明 * - currency: 貨幣代碼,預設為 `USD` * - limit: 回傳的融資統計記錄數量上限,最大 `250` * - start: 回傳的融資統計記錄中,`mts` 欄位不小於此值 * - end: 回傳的融資統計記錄中,`mts` 欄位不大於此值 * @returns * - mts: 融資統計記錄的產生時間 * - frrDiv365: [Flash Return Rate](https://support.bitfinex.com/hc/en-us/articles/213919009-What-is-the-Bitfinex-Funding-Flash-Return-Rate) 除以 365 * - frr: [Flash Return Rate](https://support.bitfinex.com/hc/en-us/articles/213919009-What-is-the-Bitfinex-Funding-Flash-Return-Rate) * - apr: 年利率 Annual Percentage Rate,由公式 `frr * 365` 計算產生 * - avgPeriod: 平均融資天數 * - amount: 融資貨幣總數量 * - amountUsed: 已使用的融資貨幣數量 * - belowThreshold: 低於 `0.75%` 的融資貨幣掛單數量 * @see [Funding Funding Statistics | BitFinex API](https://docs.bitfinex.com/reference/rest-public-funding-stats) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2FundingStatsHist({ currency: 'USD', limit: 1 })) * /* Expected output: * [ * { * mts: 2025-03-31T08:05:00.000Z, * frrDiv365: 9.2e-7, * avgPeriod: 76.12, * amount: 3401493724.8104763, * amountUsed: 3268364679.8992467, * belowThreshold: 126893437.13542865, * frr: 0.0003358, * apr: 0.122567 * } * ] * *\/ * ``` */ static v2FundingStatsHist(opts?: Input$2): Promise; /** * 取得目前 IP 位址的 GeoIp 資訊。 * @group v2 * @returns * - ip: IP 位址 * - range: IP 區塊的上下界 * - country: 2 letter ISO-3166-1 country code * - region: Up to 3 alphanumeric variable length characters as ISO 3166-2 code, For US states this is the 2 letter state, For the United Kingdom this could be ENG as a country like “England", FIPS 10-4 subcountry code * - eu: `1` if the country is a member state of the European Union, `0` otherwise. * - timezone: Timezone from IANA Time Zone Database * - city: full city name * - ll: The latitude and longitude of the city * - metro: Metro code * - area: The approximate accuracy radius (km), around the latitude and longitude * @see [geoip-lite](https://www.npmjs.com/package/geoip-lite) * @example * ```js * const { Bitfinex } = require('@taichunmin/bitfinex') * * console.log(await Bitfinex.v2IntGeoIp()) * ``` */ static v2IntGeoIp(): Promise; /** * 取得目前 apiKey 或 token 的權限。 * @group v2/auth * @see [Key Permissions | BitFinex API](https://docs.bitfinex.com/reference/key-permissions) * @example * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const util = require('node:util') * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * const perms = await bitfinex.v2AuthReadPermissions() * console.log(util.inspect(perms)) * } catch (err) { * console.log(err) * } * })() * * /* Expected output: * { * account: { read: false, write: false }, * history: { read: true, write: false }, * orders: { read: false, write: false }, * positions: { read: false, write: false }, * funding: { read: true, write: true }, * settings: { read: false, write: false }, * wallets: { read: true, write: false }, * withdraw: { read: false, write: false }, * ui_withdraw: { read: false, write: false }, * bfxpay: { read: false, write: false }, * eaas_agreement: { read: false, write: false }, * eaas_withdraw: { read: false, write: false }, * eaas_deposit: { read: false, write: false }, * eaas_brokerage: { read: false, write: false } * } * *\/ * ``` */ v2AuthReadPermissions(): Promise; /** * 取得錢包的資訊。 * @group v2/auth * @returns * - type: 錢包類型 * - currency: 貨幣代碼 * - balance: 餘額 * - unsettledInterest: 未結算的資金 * - availableBalance: 可動用餘額 * - lastChange: 最後一筆帳目異動的記錄 * - lastChange.desc: 最後一筆帳目異動的描述 * @see [Wallets | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-wallets) * @example * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log((await bitfinex.v2AuthReadWallets())?.[0]) * } catch (err) { * console.log(err) * } * })() * * /* Expected output: * { * availableBalance: 0.00001, * balance: 0.00001, * currency: 'TRX', * lastChange: {}, * type: 'exchange', * unsettledInterest: 0 * } * *\/ * ``` */ v2AuthReadWallets(): Promise; /** * 取得融資目前的掛單,如果有指定 `currency`,則只會回傳該融資代碼的掛單。如果沒有指定 `currency`,則會回傳全部的掛單。 * @group v2/auth/funding * @param opts - 參數說明 * - currency: 貨幣代碼 * @returns * - id: 掛單 ID * - symbol: 掛單的融資代碼 (fUSD, etc) * - currency: 貨幣代碼 * - mtsCreate: 建立的時間戳 * - mtsUpdate: 更新的時間戳 * - amount: 掛單的金額 * - amountOrig: 掛單的初始金額 * - type: 掛單類型 (LIMIT, ...) * - flags: 合約的相關參數 (TBD) * - status: 掛單的狀態 (ACTIVE, PARTIALLY FILLED) * - rate: 掛單的利率 * - period: 掛單的天數 * - notify: 是否通知 * - hidden: 是否隱藏 * - renew: 是否自動續借 * @see [Active Funding Offers | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-funding-offers) * @example * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log((await bitfinex.v2AuthReadFundingOffers())?.[0]) * } catch (err) { * console.log(err) * } * })() * * /* Expected output: * { * amount: 1010.5521123, * amountOrig: 1010.5521123, * flags: null, * hidden: false, * id: 3854301834, * mtsCreate: '2025-04-03T04:58:08.000Z', * mtsUpdate: '2025-04-03T04:58:08.000Z', * notify: false, * period: 6, * rate: 0.00039459, * renew: false, * status: 'ACTIVE', * symbol: 'fUSD', * type: 'LIMIT', * currency: 'USD' * } * *\/ * ``` */ v2AuthReadFundingOffers(opts?: Input$b): Promise; /** * 取得目前出借中或是借入中的融資記錄。 * @group v2/auth/funding * @param opts - 參數說明 * - currency: 貨幣代碼,如果未指定則回傳所有貨幣的融資記錄。 * @returns * - id: 融資記錄 ID * - symbol: 融資代碼 * - currency: 貨幣代碼 * - side: 融資方向,`1` 代表為貸方,`0` 代表同時為貸方與借款人,`-1` 代表為借款人 * - amount: 融資金額 * - flags: 融資參數 (目前未定義) * - status: 融資狀態 `ACTIVE` * - rateType: 融資利率類型,`FIXED` 代表固定利率,`VAR` 代表基於 FRR 浮動利率 * - rate: 融資利率 * - period: 融資天數 * - notify: 是否通知 * - hidden: 是否隱藏 * - renew: 是否自動續借 * - noClose: 在保證金交易被關閉時是否自動結束融資 * - positionPair: 保證金交易的交易對 * - mtsOpening: 融資開始時間 * - mtsLastPayout: 最後一次支付時間 * - mtsCreate: 建立時間 * - mtsUpdate: 最後更新時間 * @see [Funding Credits | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-funding-credits) * @example * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log((await bitfinex.v2AuthReadFundingCredits())?.[0]) * } catch (err) { * console.log(err) * } * })() * * /* Expected output: * [ * { * amount: 1027.10723507, * flags: 0, * hidden: false, * id: 402617569, * mtsCreate: 2025-03-31T08:50:47.000Z, * mtsLastPayout: 1970-01-01T00:00:00.000Z, * mtsOpening: 2025-03-31T08:50:47.000Z, * mtsUpdate: 2025-03-31T08:50:47.000Z, * noClose: false, * notify: false, * period: 2, * positionPair: 'tBTCUST', * rate: 0.00019958, * rateType: 'FIXED', * renew: false, * side: 1, * status: 'ACTIVE', * symbol: 'fUST', * currency: 'UST' * } * ] * *\/ * ``` */ v2AuthReadFundingCredits(opts?: Input$d): Promise; /** * 取得指定融資貨幣的自動借出設定 * @group v2/auth/funding * @param opts - 參數說明 * - currency: 貨幣代碼 * @returns * - currency: 貨幣代碼 * - period: 融資天數 * - rate: 融資利率 * - amount: 融資最大數量,`0` 代表無限制 * * 若回傳 `null` 代表沒有啟用自動借出。 * @example * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthReadFundingAutoStatus({ currency: 'USD' })) * } catch (err) { * console.log(err) * } * })() * * /* Expected output: * { amount: 0, currency: 'USD', period: 5, rate: 0.00034405 } * *\/ * ``` */ v2AuthReadFundingAutoStatus(opts: Input$e): Promise; /** * 更新融資貨幣的自動借出設定 * @group v2/auth/funding * @param opts - 參數說明 * - status: `1` 代表啟用、`0` 代表停用 * - currency: 貨幣代碼 * - amount: 融資自動借出的數量,最小為 50 USD 或等值的融資貨幣,`0` 代表無上限 * - period: 融資天數,預設為 `2` * - rate: 融資利率 (單位:百分比),省略或 `0` 代表套用 FRR 浮動利率 * @returns * - mts: 通知的時間 * - type: 通知的類型,固定為 `fa-req` * - msgId: 訊息 ID * - offer.currency: 貨幣代碼 * - offer.period: 融資天數 * - offer.rate: 融資利率 * - offer.threshold: 融資自動借出的數量,`0` 代表無上限 * - code: W.I.P. (work in progress) * - status: 通知的狀態,這個欄位可能會因時而異,可能的值為 `SUCCESS`、`ERROR`、`FAILURE`… * - text: 通知的詳細內容 * @see [Funding Auto-renew | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-funding-auto-renew) * @example * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex, FundingAutoStatus } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * * // activate with 0.1% rate * console.log(await bitfinex.v2AuthWriteFundingAuto({ currency: 'BTC', rate: 0.1, period: 2, amount: 0, status: FundingAutoStatus.activate })) * /* Expected output: * { * mts: '2025-03-31T09:06:27.737Z', * type: 'fa-req', * msgId: null, * offer: { currency: 'BTC', period: 2, rate: 0.001, threshold: 0 }, * code: null, * status: 'SUCCESS', * text: 'Auto-renew of BTC offers activated at 0.1% a day for 2 days periods' * } * *\/ * * // activate with FRR * console.log(await bitfinex.v2AuthWriteFundingAuto({ currency: 'BTC', period: 2, amount: 0, status: FundingAutoStatus.activate })) * /* Expected output: * { * mts: '2025-03-31T09:01:56.969Z', * type: 'fa-req', * msgId: null, * offer: { currency: 'BTC', period: 2, rate: 0, threshold: 0 }, * code: null, * status: 'SUCCESS', * text: 'Auto-renew of BTC offers activated at FRR for 2 days periods' * } * *\/ * * // deactivate * console.log(await bitfinex.v2AuthWriteFundingAuto({ currency: 'BTC', status: FundingAutoStatus.deactivate })) * /* Expected output: * { * mts: '2025-03-31T09:01:57.423Z', * type: 'fa-req', * msgId: null, * offer: { currency: 'BTC', period: 2, rate: 0, threshold: 0 }, * code: null, * status: 'SUCCESS', * text: 'Auto-renew deactivated for BTC offers' * } * *\/ * } catch (err) { * console.log(err) * } * })() * ``` */ v2AuthWriteFundingAuto(opts: Input$6): Promise; /** * 取得已掛單融資的交易記錄。可以用來查詢特定貨幣的融資交易記錄,或是一次取得所有貨幣的融資交易記錄。 * @group v2/auth/funding * @param opts - 參數說明 * - currency: 貨幣代碼,如果未指定則回傳所有貨幣的融資記錄。 * - limit: 回傳的交易記錄數量上限。 * - start: 回傳的交易記錄中,`mts` 欄位不小於此值 * - end: 回傳的交易記錄中,`mts` 欄位不大於此值 * @returns * - id: 融資記錄 ID * - symbol: 融資代碼 * - currency: 貨幣代碼 * - offerId: 融資掛單 ID * - amount: 融資金額 * - rate: 融資利率 * - period: 融資天數 * - mtsCreate: 建立時間 * @see [Funding Trades | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-funding-trades-hist) * @example * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthReadFundingTradesHist({ limit: 1 })) * } catch (err) { * console.log(err) * } * })() * * /* Expected output: * [ * { * amount: 1027.10723507, * id: 356904509, * mtsCreate: 2025-03-31T08:50:47.000Z, * offerId: 3850654061, * period: 2, * rate: 0.00019958, * symbol: 'fUST', * currency: 'UST' * } * ] * *\/ * ``` */ v2AuthReadFundingTradesHist(opts?: Input$a): Promise; /** * 取得已結束的融資記錄。 * @group v2/auth/funding * @param opts - 參數說明 * - currency: 貨幣代碼,如果未指定則回傳所有貨幣的融資記錄 * - limit: 回傳的融資記錄數量上限,最大 `500` * - start: 回傳的融資記錄中,`mts` 欄位不小於此值 * - end: 回傳的融資記錄中,`mts` 欄位不大於此值 * @returns * - id: 融資記錄 ID * - symbol: 融資代碼 * - currency: 貨幣代碼 * - side: 融資方向,`1` 代表為貸方,`0` 代表同時為貸方與借款人,`-1` 代表為借款人 * - amount: 融資金額 * - flags: 融資參數 (目前未定義) * - status: 融資狀態 `CLOSED (expired)` * - rateType: 融資利率類型,`FIXED` 代表固定利率,`VAR` 代表基於 FRR 浮動利率 * - rate: 融資利率 * - period: 融資天數 * - notify: 是否通知 * - hidden: 是否隱藏 * - renew: 是否自動續借 * - noClose: 在保證金交易被關閉時是否自動結束融資 * - positionPair: 保證金交易的交易對 * - mtsOpening: 融資開始時間 * - mtsLastPayout: 最後一次支付時間 * - mtsCreate: 建立時間 * - mtsUpdate: 最後更新時間 * @see [Funding Credits History | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-funding-credits-hist) * @example * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthReadFundingCreditsHist({ limit: 1 })) * } catch (err) { * console.log(err) * } * })() * * /* Expected output: * [ * { * amount: 850.29527051, * flags: null, * hidden: false, * id: 402392161, * mtsCreate: 2025-03-27T00:50:47.000Z, * mtsLastPayout: 2025-03-31T00:51:03.000Z, * mtsOpening: 2025-03-27T00:50:47.000Z, * mtsUpdate: 2025-03-30T19:28:55.000Z, * noClose: false, * notify: false, * period: 4, * positionPair: 'tBTCUST', * rate: 0.00031771, * rateType: 'FIXED', * renew: false, * side: 1, * status: 'CLOSED (expired)', * symbol: 'fUST', * currency: 'UST' * } * ] * *\/ * ``` */ v2AuthReadFundingCreditsHist(opts?: Input$c): Promise; /** * 查看過去的分類帳記錄。預設會返回最近的記錄,但可以使用時間戳來檢索特定時間的數據,最長可以取得六年內的記錄。 * @group v2/auth/ledgers * @param opts - 參數說明 * - currency: 貨幣代碼,如果未指定則回傳所有貨幣的分類帳記錄 * - category: 記錄類別,如果未指定則回傳所有類別的分類帳記錄 * - limit: 回傳的分類帳記錄數量上限,最大 `2500` * - start: 回傳的分類帳記錄中,`mts` 欄位不小於此值 * - end: 回傳的分類帳記錄中,`mts` 欄位不大於此值 * @returns * - id: Ledger ID * - currency: 貨幣代碼 * - wallet: 錢包類型 * - mts: 記錄時間 * - amount: 異動金額 * - balance: 變更後的餘額 * - description: 描述 * @see [Ledgers | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-ledgers) * @example * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex, LedgersHistCategory } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthReadLedgersHist({ category: LedgersHistCategory.MarginSwapInterestPayment, limit: 1 })) * } catch (err) { * console.log(err) * } * })() * * /* Expected output: * [ * { * amount: 0.20089545, * balance: 1009.89393076, * currency: 'USD', * description: 'Margin Funding Payment on wallet funding', * id: 9784673670, * mts: 2025-03-31T01:30:13.000Z, * wallet: 'funding' * } * ] * *\/ * ``` */ v2AuthReadLedgersHist(opts?: Input$8): Promise; /** * 取消全部的融資掛單,如果有指定貨幣時,則只取消該貨幣全部的融資掛單。 * @group v2/auth/funding * @param opts - 參數說明 * - currency: 貨幣代碼 * @returns * - mts: 通知的時間 * - type: 通知的類型,固定為 `foc_all-req` (funding offer cancel all request) * - status: 通知的狀態,這個欄位可能會因時而異,可能的值為 `SUCCESS`、`ERROR`、`FAILURE`… * - text: 通知的詳細內容 * @see [Cancel All Funding Offers | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-cancel-all-funding-offers) * @example * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthWriteFundingOfferCancelAll({ currency: 'BTC' })) * } catch (err) { * console.log(err) * } * })() * * /* Expected output: * { * mts: 2025-03-31T09:13:21.649Z, * type: 'foc_all-req', * status: 'SUCCESS', * text: 'None to cancel' * } * *\/ * ``` */ v2AuthWriteFundingOfferCancelAll(opts?: Input$5): Promise; /** * 取得帳戶指定貨幣的融資資訊 * @group v2/auth/info * @param opts - 參數說明 * - currency: 貨幣代碼,預設為 `USD` * @returns * - currency: 貨幣代碼 * - symbol: 融資代碼 * - yieldLoan: 借貸利率的加權平均 * - yieldLend: 放貸利率的加權平均 * - durationLoan: 借貸天數的加權平均 * - durationLend: 放貸天數的加權平均 * @see [Funding Info | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-info-funding) * @example * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthReadInfoFunding({ currency: 'USD' })) * } catch (err) { * console.log(err) * } * })() * * /* Expected output: * { * symbol: 'fUSD', * yieldLoan: 0, * yieldLend: 0.00022886, * durationLoan: 0, * durationLend: 0.5785416666666667, * currency: 'USD' * } * *\/ * ``` */ v2AuthReadInfoFunding(opts?: Input$9): Promise; /** * 取得重要的帳戶資訊 * @group v2/auth/info * @returns * - company: 代表此帳戶在何處註冊;在 Bitfinex 註冊的帳戶會顯示 'bitfinex',在 eosfinex 註冊的帳戶會顯示 'eosfinex' * - compCountries: 根據你的驗證資料(居住地及國籍)所產生的國家代碼陣列 * - compCountriesResid: 根據你的驗證資料(居住地)所產生的國家代碼陣列 * - competitionEnabled: 代表此帳戶是否啟用 competition * - complAccountType: 合規驗證類型 (`"individual"` 或 `"corporate"`) * - ctxSwitch.allowDisable: 帳戶是否可停用由主帳戶切換至此帳戶的功能 * - ctxSwitch.disabled: 是否禁止主帳戶切換到此帳戶 * - email: 帳戶的 email * - id: 帳戶 ID * - locale: 帳戶的語系設定 * - masterAccount * - masterAccount.groupId: 帳戶群組 ID * - masterAccount.groupWithdrawEnabled: 是否啟用群組提領 * - masterAccount.id: 主帳戶的 ID(若此帳戶為子帳戶) * - masterAccount.inheritVerification: 代表此帳戶是否繼承主帳戶的驗證 * - masterAccount.isGroupMaster: 代表此帳戶是否為群組主帳戶 * - masterAccount.mtsCreate: 主帳戶建立的時間戳 * - merchant * - merchant.enabled: 代表此帳戶是否為商家帳戶 * - merchant.isEnterprise: 代表此帳戶是否為企業商家帳戶 * - modes2FA: 已啟用的二階段驗證種類(包含 'u2f', 'otp') * - mtsAccountCreate: 帳戶建立的時間戳 * - pptEnabled: 代表此帳戶是否啟用模擬交易 * - securities * - securities.enabled: 代表此帳戶是否為證券帳戶 * - securities.isElSalvador: 代表此帳戶是否已通過薩爾瓦多證券相關驗證 * - securities.isInvestorAccredited: 代表此帳戶是否已通過合格投資人證券驗證 * - securities.isMaster: 代表此帳戶是否擁有證券子帳戶 * - timeLastLogin: 上次登入的時間戳 * - timezone: 帳戶的時區設定 * - username: 帳戶的使用者名稱 * - verification * - verification.email: 代表此電子郵件是否已驗證 * - verification.level: 帳戶的驗證等級 * - verification.levelSubmitted: 該帳戶已提交的最高驗證申請等級 * - verification.verified: 代表使用者是否為已驗證(KYC)狀態 * @see [User Info | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-info-user) * @example * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthReadInfoUser()) * } catch (err) { * console.log(err) * } * })() * ``` */ v2AuthReadInfoUser(): Promise; /** * 取得指定的使用者設定值。 * @remarks * - 可能需要有 `{ setting: { read: true } }` 權限才能讀取使用者設定。 * @group v2/auth * @see [User Settings Read | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-settings) * @example * 取得指定的使用者設定。 * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthReadSettings(['api:taichunmin_test'])) * /* Expected output: * { taichunmin_test: 'test' } * *\/ * } catch (err) { * console.log(err) * } * })() * ``` * @example * 取得 Bitfinex 的所有使用者設定。 * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthReadSettings(['api:bitfinex_*'])) * /* Expected output: * { * bitfinex_wallets_hide_small_balances: true, * // ... * } * *\/ * } catch (err) { * console.log(err) * } * })() * ``` * @example * 取得所有的使用者設定。 * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthReadSettings(['api:*'])) * /* Expected output: * { * bitfinex_wallets_hide_small_balances: true, * // ... * } * *\/ * } catch (err) { * console.log(err) * } * })() * ``` */ v2AuthReadSettings(opts: Input$7): Promise; /** * 取得指定的使用者設定值。 * @returns * - mts: 通知的時間 * - type: 通知的類型,固定為 `acc_ss` (account settings set) * - status: 通知的狀態,這個欄位可能會因時而異,可能的值為 `SUCCESS`、`ERROR`、`FAILURE`… * - affectedSettings: 被新增或修改的使用者設定數量 * @remarks * - 可能需要有 `{ setting: { write: true } }` 權限才能讀取使用者設定。 * @group v2/auth * @inlineType ZodV2AuthWriteSettingsSet.Input * @see [User Settings Write | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-settings-set) * @example * 取得指定的使用者設定。 * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthWriteSettingsSet({ * 'api:taichunmin_test': 'test', * 'api:taichunmin_foo': { bar: 2 }, * })) * /* Expected output: * { * mts: 2026-03-02T21:18:31.854Z, * type: 'acc_ss', * affectedSettings: 2, * status: 'SUCCESS' * } * *\/ * } catch (err) { * console.log(err) * } * })() * ``` */ v2AuthWriteSettingsSet(opts: Input$3): Promise; /** * 刪除指定的使用者設定值。 * @returns * - mts: 通知的時間 * - type: 通知的類型,固定為 `acc_sd` (account settings del) * - status: 通知的狀態,這個欄位可能會因時而異,可能的值為 `SUCCESS`、`ERROR`、`FAILURE`… * @remarks * - 可能需要有 `{ setting: { write: true } }` 權限才能讀取使用者設定。 * @group v2/auth * @see [User Settings Delete | BitFinex API](https://docs.bitfinex.com/reference/rest-auth-settings-del) * @example * 刪除指定的使用者設定值。 * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthWriteSettingsDel(['api:taichunmin_test'])) * /* Expected output: * { * mts: 2026-03-02T21:18:31.854Z, * type: 'acc_sd', * status: 'SUCCESS' * } * *\/ * } catch (err) { * console.log(err) * } * })() * ``` * @example * 刪除所有符合萬用字元的使用者設定值。 * ```js * apiKey = 'apiKey' * apiSecret = 'apiSecret' * * await (async () => { * try { * const { Bitfinex } = require('@taichunmin/bitfinex') * const bitfinex = new Bitfinex({ apiKey, apiSecret }) * console.log(await bitfinex.v2AuthWriteSettingsDel(['api:taichunmin_*'])) * /* Expected output: * { * mts: 2026-03-02T21:18:31.854Z, * type: 'acc_sd', * status: 'SUCCESS' * } * *\/ * } catch (err) { * console.log(err) * } * })() * ``` */ v2AuthWriteSettingsDel(opts: Input$4): Promise; } /** SDK version of `@taichunmin/bitfinex` */ declare const version: string; export { Bitfinex, BitfinexSort, FundingAutoStatus, LedgersHistCategory, PlatformStatus, V2ConfigRequest, version };