From d996638bf20366e73c717d42d3ff26063560f30d Mon Sep 17 00:00:00 2001 From: Artem Emelin <153018291+artememelin@users.noreply.github.com> Date: Wed, 17 Apr 2024 16:04:27 +0300 Subject: [PATCH] Pretty formatting (#30) --- Project.toml | 2 +- docs/src/pages/Binance.md | 6 ++--- docs/src/pages/Upbit.md | 4 ++-- examples/Binance/CoinMFutures.jl | 2 +- examples/Binance/USDMFutures.jl | 2 +- examples/Bybit/Spot.jl | 8 +++---- examples/Coinbase/Spot.jl | 10 ++++---- src/Binance/CoinMFutures/API/Candle.jl | 14 +++++------ .../CoinMFutures/API/ContinuousCandle.jl | 18 +++++++------- src/Binance/CoinMFutures/API/FundingRate.jl | 1 - src/Binance/CoinMFutures/API/IncomeLog.jl | 1 - src/Binance/CoinMFutures/API/OrderBook.jl | 1 - src/Binance/CoinMFutures/API/Ticker.jl | 2 +- src/Binance/Spot/API/Candle.jl | 14 +++++------ src/Binance/Spot/API/DepositLog.jl | 24 +++++++++---------- src/Binance/Spot/API/ExchangeInfo.jl | 10 ++++---- src/Binance/Spot/API/OrderBook.jl | 8 ------- src/Binance/Spot/API/WithdrawalLog.jl | 24 +++++++++---------- src/Binance/USDMFutures/API/Candle.jl | 14 +++++------ .../USDMFutures/API/ContinuousCandle.jl | 16 ++++++------- src/Binance/USDMFutures/API/ExchangeInfo.jl | 2 +- src/Binance/USDMFutures/API/FundingRate.jl | 4 ++-- src/Binance/USDMFutures/API/LongShortRatio.jl | 16 ++++++------- .../USDMFutures/API/OpenInterestHist.jl | 16 ++++++------- src/Binance/USDMFutures/API/OrderBook.jl | 2 +- src/Binance/USDMFutures/API/PremiumIndex.jl | 2 +- .../USDMFutures/API/TakerLongShortRatio.jl | 16 ++++++------- src/Binance/USDMFutures/API/Ticker.jl | 3 +-- .../API/TopLongShortAccountRatio.jl | 16 ++++++------- .../API/TopLongShortPositionRatio.jl | 16 ++++++------- src/Bybit/Spot/API/Candle.jl | 14 +++++------ src/Bybit/Spot/API/CoinInfo.jl | 1 - src/Bybit/Spot/API/Deposit.jl | 22 ++++++++--------- src/Bybit/Spot/API/OrderBook.jl | 2 +- src/Bybit/Spot/API/Ticker.jl | 2 +- src/Coinbase/Spot/API/Candle.jl | 11 ++++----- src/Coinbase/Spot/API/Product.jl | 3 --- src/Coinbase/Spot/API/ProductStats.jl | 2 +- src/Gateio/Spot/API/Candle.jl | 14 +++++------ src/Gateio/Spot/API/Deposit.jl | 22 ++++++++--------- src/Okex/Spot/API/Candle.jl | 14 +++++------ src/Upbit/Spot/API/DayCandle.jl | 2 +- src/Upbit/Spot/API/StatusWallet.jl | 2 +- 43 files changed, 185 insertions(+), 200 deletions(-) diff --git a/Project.toml b/Project.toml index 12602d8b..b06f5c00 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "CryptoAPIs" uuid = "5e3d4798-c815-4641-85e1-deed530626d3" -version = "0.14.0" +version = "0.14.1" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" diff --git a/docs/src/pages/Binance.md b/docs/src/pages/Binance.md index e53fffd8..0a0f93ed 100644 --- a/docs/src/pages/Binance.md +++ b/docs/src/pages/Binance.md @@ -52,11 +52,11 @@ CryptoAPIs.Binance.CoinMFutures.public_client ```@docs CryptoAPIs.Binance.CoinMFutures.candle +CryptoAPIs.Binance.CoinMFutures.continuous_candle CryptoAPIs.Binance.CoinMFutures.exchange_info -CryptoAPIs.Binance.CoinMFutures.order_book +CryptoAPIs.Binance.CoinMFutures.funding_rate CryptoAPIs.Binance.CoinMFutures.income_log -CryptoAPIs.Binance.CoinMFutures.continuous_candle +CryptoAPIs.Binance.CoinMFutures.order_book CryptoAPIs.Binance.CoinMFutures.premium_index -CryptoAPIs.Binance.CoinMFutures.funding_rate CryptoAPIs.Binance.CoinMFutures.ticker ``` diff --git a/docs/src/pages/Upbit.md b/docs/src/pages/Upbit.md index 981ce0b0..bd0d5fe5 100644 --- a/docs/src/pages/Upbit.md +++ b/docs/src/pages/Upbit.md @@ -13,8 +13,8 @@ CryptoAPIs.Upbit.Spot.public_client ```@docs CryptoAPIs.Upbit.Spot.day_candle -CryptoAPIs.Upbit.Spot.order_book -CryptoAPIs.Upbit.Spot.ticker CryptoAPIs.Upbit.Spot.market_list +CryptoAPIs.Upbit.Spot.order_book CryptoAPIs.Upbit.Spot.status_wallet +CryptoAPIs.Upbit.Spot.ticker ``` diff --git a/examples/Binance/CoinMFutures.jl b/examples/Binance/CoinMFutures.jl index acaabba4..b0517efc 100644 --- a/examples/Binance/CoinMFutures.jl +++ b/examples/Binance/CoinMFutures.jl @@ -52,4 +52,4 @@ Binance.CoinMFutures.income_log( startTime = DateTime("2023-06-22"), endTime = DateTime("2023-07-23"), limit = 1000, -) \ No newline at end of file +) diff --git a/examples/Binance/USDMFutures.jl b/examples/Binance/USDMFutures.jl index 74467b57..de271354 100644 --- a/examples/Binance/USDMFutures.jl +++ b/examples/Binance/USDMFutures.jl @@ -58,4 +58,4 @@ Binance.USDMFutures.top_long_short_account_ratio(; Binance.USDMFutures.top_long_short_position_ratio(; symbol = "BTCUSDT", period = Binance.USDMFutures.TopLongShortPositionRatio.h1, -) \ No newline at end of file +) diff --git a/examples/Bybit/Spot.jl b/examples/Bybit/Spot.jl index 02b928d2..257bbb90 100644 --- a/examples/Bybit/Spot.jl +++ b/examples/Bybit/Spot.jl @@ -13,10 +13,10 @@ CryptoAPIs.Bybit.Spot.candle(; limit = 4, ) -CryptoAPIs.Bybit.Spot.symbol_info() - CryptoAPIs.Bybit.Spot.order_book(; symbol = "ADAUSDT") +CryptoAPIs.Bybit.Spot.symbol_info() + CryptoAPIs.Bybit.Spot.ticker(; symbol = "ADAUSDT") bybit_client = BybitClient(; @@ -25,6 +25,6 @@ bybit_client = BybitClient(; secret_key = ENV["BYBIT_SECRET_KEY"], ) -CryptoAPIs.Bybit.Spot.deposit(bybit_client) - CryptoAPIs.Bybit.Spot.coin_info(bybit_client) + +CryptoAPIs.Bybit.Spot.deposit(bybit_client) diff --git a/examples/Coinbase/Spot.jl b/examples/Coinbase/Spot.jl index 74d2647a..995d1b1c 100644 --- a/examples/Coinbase/Spot.jl +++ b/examples/Coinbase/Spot.jl @@ -14,6 +14,12 @@ CryptoAPIs.Coinbase.Spot.candle(; CryptoAPIs.Coinbase.Spot.currency() +CryptoAPIs.Coinbase.Spot.product(; type = "BTC-USD") + +CryptoAPIs.Coinbase.Spot.product_stats(; product_id = "BTC-USD") + +CryptoAPIs.Coinbase.Spot.ticker(; product_id = "BTC-USDT") + coinbase_client = CoinbaseClient(; base_url = "https://api.exchange.coinbase.com", public_key = ENV["COINBASE_PUBLIC_KEY"], @@ -22,7 +28,3 @@ coinbase_client = CoinbaseClient(; ) CryptoAPIs.Coinbase.Spot.fee_estimate(coinbase_client) - -CryptoAPIs.Coinbase.Spot.product_stats(; product_id = "BTC-USD") - -CryptoAPIs.Coinbase.Spot.ticker(; product_id = "BTC-USDT") diff --git a/src/Binance/CoinMFutures/API/Candle.jl b/src/Binance/CoinMFutures/API/Candle.jl index 8b1f8fc1..6b41dad4 100644 --- a/src/Binance/CoinMFutures/API/Candle.jl +++ b/src/Binance/CoinMFutures/API/Candle.jl @@ -62,13 +62,13 @@ Kline/candlestick bars for a symbol. ## Parameters: -| Parameter | Type | Required | Description | -|:----------|:---------|:---------|:------------| -| symbol | String | true | | -| interval | Period | true | | -| endTime | DateTime | false | | -| limit | Int64 | false | | -| startTime | DateTime | false | | +| Parameter | Type | Required | Description | +|:----------|:---------|:---------|:-----------------------------------------------| +| symbol | String | true | | +| interval | Period | true | m1 m3 m5 m15 m30 h1 h2 h4 h6 h8 h12 d1 d3 w1 M1| +| endTime | DateTime | false | | +| limit | Int64 | false | | +| startTime | DateTime | false | | ## Code samples: diff --git a/src/Binance/CoinMFutures/API/ContinuousCandle.jl b/src/Binance/CoinMFutures/API/ContinuousCandle.jl index 920b4825..c4451ad2 100644 --- a/src/Binance/CoinMFutures/API/ContinuousCandle.jl +++ b/src/Binance/CoinMFutures/API/ContinuousCandle.jl @@ -65,14 +65,14 @@ Kline/candlestick bars for a specific contract type. ## Parameters: -| Parameter | Type | Required | Description | -|:-------------|:---------------|:---------|:---------------------------------------------| -| pair | String | true | | -| contractType | ContractType | true | PERPETUAL, CURRENT\\_QUARTER, NEXT\\_QUARTER | -| interval | TimeInterval | true | | -| endTime | DateTime | false | | -| limit | Int64 | false | | -| startTime | DateTime | false | | +| Parameter | Type | Required | Description | +|:-------------|:---------------|:---------|:-------------------------------------------| +| pair | String | true | | +| contractType | ContractType | true | PERPETUAL CURRENT\\_QUARTER NEXT\\_QUARTER | +| interval | TimeInterval | true | | +| endTime | DateTime | false | | +| limit | Int64 | false | | +| startTime | DateTime | false | | ## Code samples: @@ -118,4 +118,4 @@ function continuous_candle(client::BinanceClient = Binance.CoinMFutures.public_c return continuous_candle(client, ContinuousCandleQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Binance/CoinMFutures/API/FundingRate.jl b/src/Binance/CoinMFutures/API/FundingRate.jl index 7ff8e4d1..d6209384 100644 --- a/src/Binance/CoinMFutures/API/FundingRate.jl +++ b/src/Binance/CoinMFutures/API/FundingRate.jl @@ -75,4 +75,3 @@ function funding_rate(client::BinanceClient = Binance.CoinMFutures.public_client end end - diff --git a/src/Binance/CoinMFutures/API/IncomeLog.jl b/src/Binance/CoinMFutures/API/IncomeLog.jl index 020826d3..512c849d 100644 --- a/src/Binance/CoinMFutures/API/IncomeLog.jl +++ b/src/Binance/CoinMFutures/API/IncomeLog.jl @@ -56,7 +56,6 @@ end | timestamp | DateTime | false | | | signature | String | false | | - ## Code samples: ```julia diff --git a/src/Binance/CoinMFutures/API/OrderBook.jl b/src/Binance/CoinMFutures/API/OrderBook.jl index 26f5148a..27a14cb1 100644 --- a/src/Binance/CoinMFutures/API/OrderBook.jl +++ b/src/Binance/CoinMFutures/API/OrderBook.jl @@ -43,7 +43,6 @@ Gets current exchange orders. | symbol | String | true | | | limit | Int64 | false | | - ## Code samples: ```julia diff --git a/src/Binance/CoinMFutures/API/Ticker.jl b/src/Binance/CoinMFutures/API/Ticker.jl index b49068c1..524c7dee 100644 --- a/src/Binance/CoinMFutures/API/Ticker.jl +++ b/src/Binance/CoinMFutures/API/Ticker.jl @@ -96,4 +96,4 @@ function ticker(client::BinanceClient = Binance.CoinMFutures.public_client; kw.. return ticker(client, TickerQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Binance/Spot/API/Candle.jl b/src/Binance/Spot/API/Candle.jl index 961ffab1..8e56f95a 100644 --- a/src/Binance/Spot/API/Candle.jl +++ b/src/Binance/Spot/API/Candle.jl @@ -62,13 +62,13 @@ Kline/candlestick bars for a symbol. ## Parameters: -| Parameter | Type | Required | Description | -|:----------|:---------|:---------|:------------| -| symbol | String | true | | -| interval | Period | true | | -| endTime | DateTime | false | | -| limit | Int64 | false | | -| startTime | DateTime | false | | +| Parameter | Type | Required | Description | +|:----------|:---------|:---------|:------------------------------------------------| +| symbol | String | true | | +| interval | Period | true | m1 m3 m5 m15 m30 h1 h2 h4 h6 h8 h12 d1 d3 w1 M1 | +| endTime | DateTime | false | | +| limit | Int64 | false | | +| startTime | DateTime | false | | ## Code samples: diff --git a/src/Binance/Spot/API/DepositLog.jl b/src/Binance/Spot/API/DepositLog.jl index 9d12bfbc..acb8ae2f 100644 --- a/src/Binance/Spot/API/DepositLog.jl +++ b/src/Binance/Spot/API/DepositLog.jl @@ -62,18 +62,18 @@ Fetch deposit history. ## Parameters: -| Parameter | Type | Required | Description | -|:-----------|:--------------|:---------|:--------------| -| coin | String | false | | -| endTime | DateTime | false | | -| limit | Int64 | false | Default: 1000 | -| offset | Int64 | false | | -| startTime | DateTime | false | | -| status | DepositStatus | false | | -| txId | String | false | | -| recvWindow | Int64 | false | | -| timestamp | DateTime | false | | -| signature | String | false | | +| Parameter | Type | Required | Description | +|:-----------|:--------------|:---------|:-------------------------------------------------------------------------------------------------------------------| +| coin | String | false | | +| endTime | DateTime | false | | +| limit | Int64 | false | Default: 1000 | +| offset | Int64 | false | | +| startTime | DateTime | false | | +| status | DepositStatus | false | PENDING (0), SUCCESS (1), CREDITED\\_BUT\\_CANNOT\\_WITHDRAW (6), WRONG\\_DEPOSIT (7), WAITING\\_USER\\_CONFIRM (8)| +| txId | String | false | | +| recvWindow | Int64 | false | | +| timestamp | DateTime | false | | +| signature | String | false | | ## Code samples: diff --git a/src/Binance/Spot/API/ExchangeInfo.jl b/src/Binance/Spot/API/ExchangeInfo.jl index 5db4f8ae..28b8747e 100644 --- a/src/Binance/Spot/API/ExchangeInfo.jl +++ b/src/Binance/Spot/API/ExchangeInfo.jl @@ -102,11 +102,11 @@ Current exchange trading rules and symbol information. ## Parameters: -| Parameter | Type | Required | Description | -|:------------|:-------|:---------|:------------| -| permissions | Vector | false | | -| symbol | String | false | | -| symbols | Vector | false | | +| Parameter | Type | Required | Description | +|:------------|:-------|:---------|:----------------------------------------------------------------------------------------------------------------------| +| permissions | Vector | false | SPOT MARGIN LEVERAGED TRD\\_GRP\\_002 TRD\\_GRP\\_003 TRD\\_GRP\\_004 TRD\\_GRP\\_005 TRD\\_GRP\\_006 TRD\\_GRP\\_007 | +| symbol | String | false | | +| symbols | Vector | false | | ## Code samples: diff --git a/src/Binance/Spot/API/OrderBook.jl b/src/Binance/Spot/API/OrderBook.jl index 0851ff00..ef9f8626 100644 --- a/src/Binance/Spot/API/OrderBook.jl +++ b/src/Binance/Spot/API/OrderBook.jl @@ -62,10 +62,6 @@ to_pretty_json(result.result) "size":1478.6 }, ... - { - "price":0.6439, - "size":1862.3 - } ], "bids":[ { @@ -73,10 +69,6 @@ to_pretty_json(result.result) "size":28448.6 }, ... - { - "price":0.624, - "size":3339.8 - } ], "lastUpdateId":8394873195 } diff --git a/src/Binance/Spot/API/WithdrawalLog.jl b/src/Binance/Spot/API/WithdrawalLog.jl index 4c3d4d51..586bb34a 100644 --- a/src/Binance/Spot/API/WithdrawalLog.jl +++ b/src/Binance/Spot/API/WithdrawalLog.jl @@ -66,18 +66,18 @@ Fetch withdraw history. ## Parameters: -| Parameter | Type | Required | Description | -|:----------------|:---------------|:---------|:--------------| -| coin | String | false | | -| endTime | DateTime | false | | -| limit | Int64 | false | Default: 1000 | -| offset | Int64 | false | | -| startTime | DateTime | false | | -| status | WithdrawStatus | false | | -| withdrawOrderId | String | false | | -| recvWindow | Int64 | false | | -| signature | String | false | | -| timestamp | DateTime | false | | +| Parameter | Type | Required | Description | +|:----------------|:---------------|:---------|:-------------------------------------------------------------------------------------------------------------------| +| coin | String | false | | +| endTime | DateTime | false | | +| limit | Int64 | false | Default: 1000 | +| offset | Int64 | false | | +| startTime | DateTime | false | | +| status | WithdrawStatus | false | EMAIL\\_SENT (0), CANCELLED (1), AWAITING\\_APPROVAL (2), REJECTED (3), PROCESSING (4), FAILURE (5), COMPLETED (6) | +| withdrawOrderId | String | false | | +| recvWindow | Int64 | false | | +| signature | String | false | | +| timestamp | DateTime | false | | ## Code samples: diff --git a/src/Binance/USDMFutures/API/Candle.jl b/src/Binance/USDMFutures/API/Candle.jl index a67d75cf..70f4136e 100644 --- a/src/Binance/USDMFutures/API/Candle.jl +++ b/src/Binance/USDMFutures/API/Candle.jl @@ -62,13 +62,13 @@ Wrapper for method: [`GET fapi/v3/klines`](https://binance-docs.github.io/apidoc ## Parameters: -| Parameter | Type | Required | Description | -|:-----------|:----------------|:---------|:------------| -| symbol | String | true | | -| interval | TimeInterval | true | | -| endTime | DateTime | false | | -| limit | Int64 | false | | -| startTime | DateTime | false | | +| Parameter | Type | Required | Description | +|:-----------|:----------------|:---------|:------------------------------------------------| +| symbol | String | true | | +| interval | TimeInterval | true | m1 m3 m5 m15 m30 h1 h2 h4 h6 h8 h12 d1 d3 w1 M1 | +| endTime | DateTime | false | | +| limit | Int64 | false | | +| startTime | DateTime | false | | ## Code samples: diff --git a/src/Binance/USDMFutures/API/ContinuousCandle.jl b/src/Binance/USDMFutures/API/ContinuousCandle.jl index 516c1bdb..33b83098 100644 --- a/src/Binance/USDMFutures/API/ContinuousCandle.jl +++ b/src/Binance/USDMFutures/API/ContinuousCandle.jl @@ -65,13 +65,13 @@ Kline/candlestick bars for a specific contract type. ## Parameters: -| Parameter | Type | Required | Description | -|:-------------|:---------------|:---------|:--------------------------------------------------------------| -| pair | String | true | | -| contractType | ContractType | true | PERPETUAL, CURRENT\\_QUARTER, NEXT\\_QUARTER | -| interval | TimeInterval | true | m1, m3, m5, m15, m30, h1, h2, h4, h6, h8, h12, d1, d3, w1, M1 | -| endTime | DateTime | false | | -| limit | Int64 | false | | +| Parameter | Type | Required | Description | +|:-------------|:---------------|:---------|:------------------------------------------------| +| pair | String | true | | +| contractType | ContractType | true | PERPETUAL CURRENT\\_QUARTER NEXT\\_QUARTER | +| interval | TimeInterval | true | m1 m3 m5 m15 m30 h1 h2 h4 h6 h8 h12 d1 d3 w1 M1 | +| endTime | DateTime | false | | +| limit | Int64 | false | | | startTime | DateTime | false | ## Code samples: @@ -118,4 +118,4 @@ function continuous_candle(client::BinanceClient = Binance.USDMFutures.public_cl return continuous_candle(client, ContinuousCandleQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Binance/USDMFutures/API/ExchangeInfo.jl b/src/Binance/USDMFutures/API/ExchangeInfo.jl index 22583900..9fe82869 100644 --- a/src/Binance/USDMFutures/API/ExchangeInfo.jl +++ b/src/Binance/USDMFutures/API/ExchangeInfo.jl @@ -92,7 +92,7 @@ end exchange_info(client::BinanceClient, query::ExchangeInfoQuery) exchange_info(client::BinanceClient = Binance.USDMFutures.public_client; kw...) -Current exchange trading rules and symbol information +Current exchange trading rules and symbol information. [`GET fapi/v1/exchangeInfo`](https://binance-docs.github.io/apidocs/futures/en/#exchange-information) diff --git a/src/Binance/USDMFutures/API/FundingRate.jl b/src/Binance/USDMFutures/API/FundingRate.jl index 85478a55..d8c4f564 100644 --- a/src/Binance/USDMFutures/API/FundingRate.jl +++ b/src/Binance/USDMFutures/API/FundingRate.jl @@ -32,7 +32,7 @@ end funding_rate(client::BinanceClient, query::FundingRateQuery) funding_rate(client::BinanceClient = Binance.USDMFutures.public_client; kw...) -Get funding rate history +Get funding rate history. [`GET fapi/v1/fundingRate`](https://binance-docs.github.io/apidocs/futures/en/#get-funding-rate-history) @@ -80,4 +80,4 @@ function funding_rate(client::BinanceClient = Binance.USDMFutures.public_client; return funding_rate(client, FundingRateQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Binance/USDMFutures/API/LongShortRatio.jl b/src/Binance/USDMFutures/API/LongShortRatio.jl index 0a1f69bd..a57f8b64 100644 --- a/src/Binance/USDMFutures/API/LongShortRatio.jl +++ b/src/Binance/USDMFutures/API/LongShortRatio.jl @@ -48,13 +48,13 @@ end ## Parameters: -| Parameter | Type | Required | Description | -|:-------------|:---------------|:---------|:-----------------------------------------------| -| symbol | String | true | | -| period | TimeInterval | true | m5, m15, m30, h1, h2, h4, h6, h12, d1 | -| endTime | DateTime | false | | -| limit | Int64 | false | default 30, max 500 | -| startTime | DateTime | false | | +| Parameter | Type | Required | Description | +|:-------------|:---------------|:---------|:------------------------------| +| symbol | String | true | | +| period | TimeInterval | true | m5 m15 m30 h1 h2 h4 h6 h12 d1 | +| endTime | DateTime | false | | +| limit | Int64 | false | Default: 30, Max: 500 | +| startTime | DateTime | false | | ## Code samples: @@ -93,4 +93,4 @@ function long_short_ratio(client::BinanceClient = Binance.USDMFutures.public_cli return long_short_ratio(client, LongShortRatioQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Binance/USDMFutures/API/OpenInterestHist.jl b/src/Binance/USDMFutures/API/OpenInterestHist.jl index fc98373e..a0987849 100644 --- a/src/Binance/USDMFutures/API/OpenInterestHist.jl +++ b/src/Binance/USDMFutures/API/OpenInterestHist.jl @@ -47,13 +47,13 @@ end ## Parameters: -| Parameter | Type | Required | Description | -|:-------------|:---------------|:---------|:-----------------------------------------------| -| symbol | String | true | | -| period | TimeInterval | true | m5, m15, m30, h1, h2, h4, h6, h12, d1 | -| endTime | DateTime | false | | -| limit | Int64 | false | default 30, max 500 | -| startTime | DateTime | false | | +| Parameter | Type | Required | Description | +|:-------------|:---------------|:---------|:------------------------------| +| symbol | String | true | | +| period | TimeInterval | true | m5 m15 m30 h1 h2 h4 h6 h12 d1 | +| endTime | DateTime | false | | +| limit | Int64 | false | Default: 30, Max: 500 | +| startTime | DateTime | false | | ## Code samples: @@ -91,4 +91,4 @@ function open_interest_hist(client::BinanceClient = Binance.USDMFutures.public_c return open_interest_hist(client, OpenInterestHistQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Binance/USDMFutures/API/OrderBook.jl b/src/Binance/USDMFutures/API/OrderBook.jl index 8e634add..96f529b6 100644 --- a/src/Binance/USDMFutures/API/OrderBook.jl +++ b/src/Binance/USDMFutures/API/OrderBook.jl @@ -86,4 +86,4 @@ function order_book(client::BinanceClient = Binance.USDMFutures.public_client; k return order_book(client, OrderBookQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Binance/USDMFutures/API/PremiumIndex.jl b/src/Binance/USDMFutures/API/PremiumIndex.jl index 5d263a80..b029f7a0 100644 --- a/src/Binance/USDMFutures/API/PremiumIndex.jl +++ b/src/Binance/USDMFutures/API/PremiumIndex.jl @@ -77,4 +77,4 @@ function premium_index(client::BinanceClient = Binance.USDMFutures.public_client return premium_index(client, PremiumIndexQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Binance/USDMFutures/API/TakerLongShortRatio.jl b/src/Binance/USDMFutures/API/TakerLongShortRatio.jl index 66f30aa6..f508d8d3 100644 --- a/src/Binance/USDMFutures/API/TakerLongShortRatio.jl +++ b/src/Binance/USDMFutures/API/TakerLongShortRatio.jl @@ -47,13 +47,13 @@ end ## Parameters: -| Parameter | Type | Required | Description | -|:-------------|:---------------|:---------|:-----------------------------------------------| -| symbol | String | true | | -| period | TimeInterval | true | m5, m15, m30, h1, h2, h4, h6, h12, d1 | -| endTime | DateTime | false | | -| limit | Int64 | false | default 30, max 500 | -| startTime | DateTime | false | | +| Parameter | Type | Required | Description | +|:-------------|:---------------|:---------|:------------------------------| +| symbol | String | true | | +| period | TimeInterval | true | m5 m15 m30 h1 h2 h4 h6 h12 d1 | +| endTime | DateTime | false | | +| limit | Int64 | false | Default: 30, Max: 500 | +| startTime | DateTime | false | | ## Code samples: @@ -91,4 +91,4 @@ function taker_long_short_ratio(client::BinanceClient = Binance.USDMFutures.publ return taker_long_short_ratio(client, TakerLongShortRatioQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Binance/USDMFutures/API/Ticker.jl b/src/Binance/USDMFutures/API/Ticker.jl index 2d6fb8ca..04f46f84 100644 --- a/src/Binance/USDMFutures/API/Ticker.jl +++ b/src/Binance/USDMFutures/API/Ticker.jl @@ -47,7 +47,6 @@ end |:----------|:-------|:---------|:------------| | symbol | String | false | | - ## Code samples: ```julia @@ -96,4 +95,4 @@ function ticker(client::BinanceClient = Binance.USDMFutures.public_client; kw... return ticker(client, TickerQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Binance/USDMFutures/API/TopLongShortAccountRatio.jl b/src/Binance/USDMFutures/API/TopLongShortAccountRatio.jl index 7b06d823..936ce621 100644 --- a/src/Binance/USDMFutures/API/TopLongShortAccountRatio.jl +++ b/src/Binance/USDMFutures/API/TopLongShortAccountRatio.jl @@ -48,13 +48,13 @@ end ## Parameters: -| Parameter | Type | Required | Description | -|:-------------|:---------------|:---------|:-----------------------------------------------| -| symbol | String | true | | -| period | TimeInterval | true | m5, m15, m30, h1, h2, h4, h6, h12, d1 | -| endTime | DateTime | false | | -| limit | Int64 | false | default 30, max 500 | -| startTime | DateTime | false | | +| Parameter | Type | Required | Description | +|:-------------|:---------------|:---------|:------------------------------| +| symbol | String | true | | +| period | TimeInterval | true | m5 m15 m30 h1 h2 h4 h6 h12 d1 | +| endTime | DateTime | false | | +| limit | Int64 | false | Default: 30, Max: 500 | +| startTime | DateTime | false | | ## Code samples: @@ -93,4 +93,4 @@ function top_long_short_account_ratio(client::BinanceClient = Binance.USDMFuture return top_long_short_account_ratio(client, TopLongShortAccountRatioQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Binance/USDMFutures/API/TopLongShortPositionRatio.jl b/src/Binance/USDMFutures/API/TopLongShortPositionRatio.jl index 63454c5c..c10b44b1 100644 --- a/src/Binance/USDMFutures/API/TopLongShortPositionRatio.jl +++ b/src/Binance/USDMFutures/API/TopLongShortPositionRatio.jl @@ -48,13 +48,13 @@ end ## Parameters: -| Parameter | Type | Required | Description | -|:-------------|:---------------|:---------|:-----------------------------------------------| -| symbol | String | true | | -| period | TimeInterval | true | m5, m15, m30, h1, h2, h4, h6, h12, d1 | -| endTime | DateTime | false | | -| limit | Int64 | false | default 30, max 500 | -| startTime | DateTime | false | | +| Parameter | Type | Required | Description | +|:-------------|:---------------|:---------|:------------------------------| +| symbol | String | true | | +| period | TimeInterval | true | m5 m15 m30 h1 h2 h4 h6 h12 d1 | +| endTime | DateTime | false | | +| limit | Int64 | false | Default: 30, Max: 500 | +| startTime | DateTime | false | | ## Code samples: @@ -93,4 +93,4 @@ function top_long_short_position_ratio(client::BinanceClient = Binance.USDMFutur return top_long_short_position_ratio(client, TopLongShortPositionRatioQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Bybit/Spot/API/Candle.jl b/src/Bybit/Spot/API/Candle.jl index 7e12dcc1..50cb9e40 100644 --- a/src/Bybit/Spot/API/Candle.jl +++ b/src/Bybit/Spot/API/Candle.jl @@ -58,13 +58,13 @@ end ## Parameters: -| Parameter | Type | Required | Description | -|:----------|:-------------|:---------|:------------| -| symbol | String | true | | -| interval | TimeInterval | true | | -| endTime | DateTime | false | | -| limit | Int64 | false | | -| startTime | DateTime | false | | +| Parameter | Type | Required | Description | +|:----------|:-------------|:---------|:------------------------------------------------| +| symbol | String | true | | +| interval | TimeInterval | true | m1 m3 m5 m15 m30 h1 h2 h4 h6 h8 h12 d1 d3 w1 M1 | +| endTime | DateTime | false | | +| limit | Int64 | false | | +| startTime | DateTime | false | | ## Code samples: diff --git a/src/Bybit/Spot/API/CoinInfo.jl b/src/Bybit/Spot/API/CoinInfo.jl index a6594f1e..9861cf00 100644 --- a/src/Bybit/Spot/API/CoinInfo.jl +++ b/src/Bybit/Spot/API/CoinInfo.jl @@ -65,7 +65,6 @@ Query Coin Information. | signature | String | false | | | timestamp | DateTime | false | | - ## Code samples: ```julia diff --git a/src/Bybit/Spot/API/Deposit.jl b/src/Bybit/Spot/API/Deposit.jl index f26498d8..541e03fd 100644 --- a/src/Bybit/Spot/API/Deposit.jl +++ b/src/Bybit/Spot/API/Deposit.jl @@ -53,17 +53,17 @@ Query Deposit Records. ## Parameters: -| Parameter | Type | Required | Description | -|:------------|:---------|:---------|:----------------------------| -| coin | String | false | | -| cursor | String | false | | -| endTime | DateTime | false | | -| limit | Int64 | false | Default value is 50, max 50 | -| startTime | DateTime | false | | -| api_key | String | false | | -| recv_window | Int64 | false | Default value is 5000 | -| signature | String | false | | -| timestamp | DateTime | false | | +| Parameter | Type | Required | Description | +|:------------|:---------|:---------|:---------------------| +| coin | String | false | | +| cursor | String | false | | +| endTime | DateTime | false | | +| limit | Int64 | false | Default: 50, Max: 50 | +| startTime | DateTime | false | | +| api_key | String | false | | +| recv_window | Int64 | false | Default: 5000 | +| signature | String | false | | +| timestamp | DateTime | false | | ## Code samples: diff --git a/src/Bybit/Spot/API/OrderBook.jl b/src/Bybit/Spot/API/OrderBook.jl index 9ebe6859..a28ace97 100644 --- a/src/Bybit/Spot/API/OrderBook.jl +++ b/src/Bybit/Spot/API/OrderBook.jl @@ -89,4 +89,4 @@ function order_book(client::BybitClient = Bybit.Spot.public_client; kw...) return order_book(client, OrderBookQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Bybit/Spot/API/Ticker.jl b/src/Bybit/Spot/API/Ticker.jl index c3e1434a..655a9dcd 100644 --- a/src/Bybit/Spot/API/Ticker.jl +++ b/src/Bybit/Spot/API/Ticker.jl @@ -88,4 +88,4 @@ function ticker(client::BybitClient = Bybit.Spot.public_client; kw...) return ticker(client, TickerQuery(; kw...)) end -end \ No newline at end of file +end diff --git a/src/Coinbase/Spot/API/Candle.jl b/src/Coinbase/Spot/API/Candle.jl index 92fb8b13..e8d14690 100644 --- a/src/Coinbase/Spot/API/Candle.jl +++ b/src/Coinbase/Spot/API/Candle.jl @@ -46,12 +46,11 @@ Get rates for a single product by product ID, grouped in buckets. ## Parameters: -| Parameter | Type | Required | Description | -|:------------|:-------------|:---------|:------------| -| granularity | TimeInterval | true | | -| start | DateTime | false | | -| _end | DateTime | false | | - +| Parameter | Type | Required | Description | +|:------------|:-------------|:---------|:-------------------| +| granularity | TimeInterval | true | m1 m5 m15 h1 h6 d1 | +| start | DateTime | false | | +| _end | DateTime | false | | ## Code samples: diff --git a/src/Coinbase/Spot/API/Product.jl b/src/Coinbase/Spot/API/Product.jl index 3fff2754..de3b5e8d 100644 --- a/src/Coinbase/Spot/API/Product.jl +++ b/src/Coinbase/Spot/API/Product.jl @@ -10,12 +10,9 @@ using Dates, NanoDates, TimeZones using CryptoAPIs.Coinbase using CryptoAPIs: Maybe, APIsRequest -# Products - Base.@kwdef struct ProductQuery <: CoinbasePublicQuery type::Maybe{String} = nothing end - struct ProductData <: CoinbaseData id::String base_currency::Maybe{String} diff --git a/src/Coinbase/Spot/API/ProductStats.jl b/src/Coinbase/Spot/API/ProductStats.jl index c95b321f..8f882a22 100644 --- a/src/Coinbase/Spot/API/ProductStats.jl +++ b/src/Coinbase/Spot/API/ProductStats.jl @@ -71,4 +71,4 @@ function product_stats(client::CoinbaseClient = Coinbase.Spot.public_client; pro return product_stats(client, ProductStatsQuery(; kw...); product_id = product_id) end -end \ No newline at end of file +end diff --git a/src/Gateio/Spot/API/Candle.jl b/src/Gateio/Spot/API/Candle.jl index f2aa0018..30b5d2ad 100644 --- a/src/Gateio/Spot/API/Candle.jl +++ b/src/Gateio/Spot/API/Candle.jl @@ -54,13 +54,13 @@ Market candlesticks. ## Parameters: -| Parameter | Type | Required | Description | -|:--------------|:-------------|:---------|:------------| -| currency_pair | String | true | | -| from | DateTime | false | | -| interval | TimeInterval | false | | -| limit | Int64 | false | | -| _end | DateTime | false | | +| Parameter | Type | Required | Description | +|:--------------|:-------------|:---------|:-------------------------------------| +| currency_pair | String | true | | +| from | DateTime | false | | +| interval | TimeInterval | false | s10 m1 m5 m15 m30 h1 h4 h8 d1 d7 d30 | +| limit | Int64 | false | | +| _end | DateTime | false | | ## Code samples: diff --git a/src/Gateio/Spot/API/Deposit.jl b/src/Gateio/Spot/API/Deposit.jl index 9ae148bf..cf0101c6 100644 --- a/src/Gateio/Spot/API/Deposit.jl +++ b/src/Gateio/Spot/API/Deposit.jl @@ -10,17 +10,6 @@ using Dates, NanoDates, TimeZones using CryptoAPIs.Gateio using CryptoAPIs: Maybe, APIsRequest -Base.@kwdef mutable struct DepositQuery <: GateioPrivateQuery - currency::Maybe{String} = nothing - from::Maybe{DateTime} = nothing - limit::Maybe{Int64} = nothing - offset::Maybe{Int64} = nothing - to::Maybe{DateTime} = nothing - - signature::Maybe{String} = nothing - signTimestamp::Maybe{DateTime} = nothing -end - @enum RecordStatus begin DONE CANCEL @@ -37,6 +26,17 @@ end SPLITPEND end +Base.@kwdef mutable struct DepositQuery <: GateioPrivateQuery + currency::Maybe{String} = nothing + from::Maybe{DateTime} = nothing + limit::Maybe{Int64} = nothing + offset::Maybe{Int64} = nothing + to::Maybe{DateTime} = nothing + + signature::Maybe{String} = nothing + signTimestamp::Maybe{DateTime} = nothing +end + struct DepositData <: GateioData address::String amount::Float64 diff --git a/src/Okex/Spot/API/Candle.jl b/src/Okex/Spot/API/Candle.jl index d624d6f2..4f12a649 100644 --- a/src/Okex/Spot/API/Candle.jl +++ b/src/Okex/Spot/API/Candle.jl @@ -62,13 +62,13 @@ Retrieve the candlestick charts. ## Parameters: -| Parameter | Type | Required | Description | -|:----------|:-------------|:---------|:------------| -| instId | String | true | | -| after | DateTime | false | | -| bar | TimeInterval | false | | -| before | DateTime | false | | -| limit | Int64 | false | | +| Parameter | Type | Required | Description | +|:----------|:-------------|:---------|:---------------------------------------------------| +| instId | String | true | | +| after | DateTime | false | | +| bar | TimeInterval | false | m1 m3 m5 m15 m30 h1 h2 h4 h6 h12 d1 d2 d3 w1 M1 M3 | +| before | DateTime | false | | +| limit | Int64 | false | | ## Code samples: diff --git a/src/Upbit/Spot/API/DayCandle.jl b/src/Upbit/Spot/API/DayCandle.jl index dc536af3..b2609192 100644 --- a/src/Upbit/Spot/API/DayCandle.jl +++ b/src/Upbit/Spot/API/DayCandle.jl @@ -47,7 +47,7 @@ Daily candle data. |:--------------------|:---------|:---------|:------------| | market | String | true | | | convertingPriceUnit | String | false | | -| count | Int64 | false | | +| count | Int64 | false | Max: 200 | | to | DateTime | false | | ## Code samples: diff --git a/src/Upbit/Spot/API/StatusWallet.jl b/src/Upbit/Spot/API/StatusWallet.jl index dbb8219e..c7b95186 100644 --- a/src/Upbit/Spot/API/StatusWallet.jl +++ b/src/Upbit/Spot/API/StatusWallet.jl @@ -85,4 +85,4 @@ function status_wallet(client::UpbitClient; kw...) return status_wallet(client, StatusWalletQuery(; kw...)) end -end \ No newline at end of file +end