Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 42 additions & 20 deletions ts/src/upbit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchMarkets
* @see https://docs.upbit.com/reference/%EB%A7%88%EC%BC%93-%EC%BD%94%EB%93%9C-%EC%A1%B0%ED%9A%8C
* @see https://docs.upbit.com/kr/reference/마켓-코드-조회
* @see https://global-docs.upbit.com/reference/listing-market-list
* @description retrieves data on all markets for upbit
* @param {object} [params] extra parameters specific to the exchange API endpoint
* @returns {object[]} an array of objects representing market data
Expand Down Expand Up @@ -592,7 +593,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchBalance
* @see https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EA%B3%84%EC%A2%8C-%EC%A1%B0%ED%9A%8C
* @see https://docs.upbit.com/kr/reference/전체-계좌-조회
* @see https://global-docs.upbit.com/reference/overall-account-inquiry
* @description query for balance and get the amount of funds available for trading or funds locked in orders
* @param {object} [params] extra parameters specific to the exchange API endpoint
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
Expand All @@ -618,7 +620,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchOrderBooks
* @see https://docs.upbit.com/reference/%ED%98%B8%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
* @see https://docs.upbit.com/kr/reference/호가-정보-조회
* @see https://global-docs.upbit.com/reference/order-book-list
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets
* @param {string[]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined
* @param {int} [limit] not used by upbit fetchOrderBooks ()
Expand Down Expand Up @@ -687,7 +690,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchOrderBook
* @see https://docs.upbit.com/reference/%ED%98%B8%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
* @see https://docs.upbit.com/kr/reference/호가-정보-조회
* @see https://global-docs.upbit.com/reference/order-book-list
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
* @param {string} symbol unified symbol of the market to fetch the order book for
* @param {int} [limit] the maximum amount of order book entries to return
Expand Down Expand Up @@ -759,7 +763,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchTickers
* @see https://docs.upbit.com/reference/ticker%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4
* @see https://docs.upbit.com/kr/reference/ticker현재가-정보
* @see https://global-docs.upbit.com/reference/tickers
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
* @param {object} [params] extra parameters specific to the exchange API endpoint
Expand Down Expand Up @@ -819,7 +824,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchTicker
* @see https://docs.upbit.com/reference/ticker%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4
* @see https://docs.upbit.com/kr/reference/ticker현재가-정보
* @see https://global-docs.upbit.com/reference/tickers
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
* @param {string} symbol unified symbol of the market to fetch the ticker for
* @param {object} [params] extra parameters specific to the exchange API endpoint
Expand Down Expand Up @@ -905,7 +911,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchTrades
* @see https://docs.upbit.com/reference/%EC%B5%9C%EA%B7%BC-%EC%B2%B4%EA%B2%B0-%EB%82%B4%EC%97%AD
* @see https://docs.upbit.com/kr/reference/최근-체결-내역
* @see https://global-docs.upbit.com/reference/today-trades-history
* @description get the list of most recent trades for a particular symbol
* @param {string} symbol unified symbol of the market to fetch trades for
* @param {int} [since] timestamp in ms of the earliest trade to fetch
Expand Down Expand Up @@ -952,7 +959,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchTradingFee
* @see https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8-%EA%B0%80%EB%8A%A5-%EC%A0%95%EB%B3%B4
* @see https://docs.upbit.com/kr/reference/주문-가능-정보
* @see https://global-docs.upbit.com/reference/available-order-information
* @description fetch the trading fees for a market
* @param {string} symbol unified market symbol
* @param {object} [params] extra parameters specific to the exchange API endpoint
Expand Down Expand Up @@ -1068,7 +1076,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchOHLCV
* @see https://docs.upbit.com/reference/%EB%B6%84minute-%EC%BA%94%EB%93%A4-1
* @see https://docs.upbit.com/kr/reference/분minute-캔들-1
* @see https://global-docs.upbit.com/reference/minutes
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
* @param {string} timeframe the length of time each candle represents
Expand Down Expand Up @@ -1162,7 +1171,7 @@ export default class upbit extends Exchange {
* @method
* @name upbit#createOrder
* @description create a trade order
* @see https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8%ED%95%98%EA%B8%B0
* @see https://docs.upbit.com/kr/reference/주문하기
* @see https://global-docs.upbit.com/reference/order
* @param {string} symbol unified symbol of the market to create an order in
* @param {string} type supports 'market' and 'limit'. if params.ordType is set to best, a best-type order will be created regardless of the value of type.
Expand Down Expand Up @@ -1269,7 +1278,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#cancelOrder
* @see https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8-%EC%B7%A8%EC%86%8C
* @see https://docs.upbit.com/kr/reference/주문-취소
* @see https://global-docs.upbit.com/reference/order-cancel
* @description cancels an open order
* @param {string} id order id
* @param {string} symbol not used by upbit cancelOrder ()
Expand Down Expand Up @@ -1307,7 +1317,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#editOrder
* @see https://docs.upbit.com/reference/%EC%B7%A8%EC%86%8C-%ED%9B%84-%EC%9E%AC%EC%A3%BC%EB%AC%B8
* @see https://docs.upbit.com/kr/reference/취소-후-재주문
* @see https://global-docs.upbit.com/reference/cancel-and-new
* @description canceled existing order and create new order. It's only generated same side and symbol as the canceled order. it returns the data of the canceled order, except for `new_order_uuid` and `new_identifier`. to get the details of the new order, use `fetchOrder(new_order_uuid)`.
* @param {string} id the uuid of the previous order you want to edit.
* @param {string} symbol the symbol of the new order. it must be the same as the symbol of the previous order.
Expand Down Expand Up @@ -1420,7 +1431,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchDeposits
* @see https://docs.upbit.com/reference/%EC%9E%85%EA%B8%88-%EB%A6%AC%EC%8A%A4%ED%8A%B8-%EC%A1%B0%ED%9A%8C
* @see https://docs.upbit.com/kr/reference/입금-리스트-조회
* @see https://global-docs.upbit.com/reference/deposit-list-inquiry
* @description fetch all deposits made to an account
* @param {string} code unified currency code
* @param {int} [since] the earliest time in ms to fetch deposits for
Expand Down Expand Up @@ -1466,6 +1478,7 @@ export default class upbit extends Exchange {
* @method
* @name upbit#fetchDeposit
* @description fetch information on a deposit
* @see https://docs.upbit.com/kr/reference/개별-입금-조회
* @see https://global-docs.upbit.com/reference/individual-deposit-inquiry
* @param {string} id the unique id for the deposit
* @param {string} [code] unified currency code of the currency deposited
Expand Down Expand Up @@ -1505,7 +1518,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchWithdrawals
* @see https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EC%B6%9C%EA%B8%88-%EC%A1%B0%ED%9A%8C
* @see https://docs.upbit.com/kr/reference/전체-출금-조회
* @see https://global-docs.upbit.com/reference/withdrawal-list-inquiry
* @description fetch all withdrawals made from an account
* @param {string} code unified currency code
* @param {int} [since] the earliest time in ms to fetch withdrawals for
Expand Down Expand Up @@ -1551,6 +1565,7 @@ export default class upbit extends Exchange {
* @method
* @name upbit#fetchWithdrawal
* @description fetch data on a currency withdrawal via the withdrawal id
* @see https://docs.upbit.com/kr/reference/개별-출금-조회
* @see https://global-docs.upbit.com/reference/individual-withdrawal-inquiry
* @param {string} id the unique id for the withdrawal
* @param {string} [code] unified currency code of the currency withdrawn
Expand Down Expand Up @@ -1854,6 +1869,7 @@ export default class upbit extends Exchange {
* @method
* @name upbit#fetchOpenOrders
* @description fetch all unfilled currently open orders
* @see https://docs.upbit.com/kr/reference/대기-주문-조회
* @see https://global-docs.upbit.com/reference/open-order
* @param {string} symbol unified market symbol
* @param {int} [since] the earliest time in ms to fetch open orders for
Expand Down Expand Up @@ -1903,6 +1919,7 @@ export default class upbit extends Exchange {
* @method
* @name upbit#fetchClosedOrders
* @description fetches information on multiple closed orders made by the user
* @see https://docs.upbit.com/kr/reference/종료-주문-조회
* @see https://global-docs.upbit.com/reference/closed-order
* @param {string} symbol unified market symbol of the market orders were made in
* @param {int} [since] the earliest time in ms to fetch orders for
Expand Down Expand Up @@ -1959,6 +1976,7 @@ export default class upbit extends Exchange {
* @method
* @name upbit#fetchCanceledOrders
* @description fetches information on multiple canceled orders made by the user
* @see https://docs.upbit.com/kr/reference/종료-주문-조회
* @see https://global-docs.upbit.com/reference/closed-order
* @param {string} symbol unified market symbol of the market orders were made in
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
Expand Down Expand Up @@ -2014,7 +2032,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchOrder
* @see https://docs.upbit.com/reference/%EA%B0%9C%EB%B3%84-%EC%A3%BC%EB%AC%B8-%EC%A1%B0%ED%9A%8C
* @see https://docs.upbit.com/kr/reference/개별-주문-조회
* @see https://global-docs.upbit.com/reference/individual-order-inquiry
* @description fetches information on an order made by the user
* @param {string} id order id
* @param {string} symbol not used by upbit fetchOrder
Expand Down Expand Up @@ -2076,7 +2095,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchDepositAddresses
* @see https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%A1%B0%ED%9A%8C
* @see https://docs.upbit.com/kr/reference/전체-입금-주소-조회
* @see https://global-docs.upbit.com/reference/general-deposit-address-inquiry
* @description fetch deposit addresses for multiple currencies and chain types
* @param {string[]|undefined} codes list of unified currency codes, default is undefined
* @param {object} [params] extra parameters specific to the exchange API endpoint
Expand Down Expand Up @@ -2134,7 +2154,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#fetchDepositAddress
* @see https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%A1%B0%ED%9A%8C
* @see https://docs.upbit.com/kr/reference/개별-입금-주소-조회
* @see https://global-docs.upbit.com/reference/individual-deposit-address-inquiry
* @description fetch the deposit address for a currency associated with this account
* @param {string} code unified currency code
* @param {object} [params] extra parameters specific to the exchange API endpoint
Expand Down Expand Up @@ -2167,7 +2188,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#createDepositAddress
* @see https://docs.upbit.com/reference/%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%83%9D%EC%84%B1-%EC%9A%94%EC%B2%AD
* @see https://docs.upbit.com/kr/reference/입금-주소-생성-요청
* @see https://global-docs.upbit.com/reference/deposit-address-generation
* @description create a currency deposit address
* @param {string} code unified currency code of the currency for the deposit address
* @param {object} [params] extra parameters specific to the exchange API endpoint
Expand Down Expand Up @@ -2206,8 +2228,8 @@ export default class upbit extends Exchange {
/**
* @method
* @name upbit#withdraw
* @see https://docs.upbit.com/reference/디지털자산-출금하기
* @see https://docs.upbit.com/reference/%EC%9B%90%ED%99%94-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0
* @see https://docs.upbit.com/kr/reference/디지털자산-출금하기
* @see https://global-docs.upbit.com/reference/withdrawal-digital-assets
* @description make a withdrawal
* @param {string} code unified currency code
* @param {float} amount the amount to withdraw
Expand Down