Skip to content

Commit

Permalink
Pretty formatting (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
artememelin authored Apr 17, 2024
1 parent 55c24c4 commit d996638
Show file tree
Hide file tree
Showing 43 changed files with 185 additions and 200 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 3 additions & 3 deletions docs/src/pages/Binance.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
4 changes: 2 additions & 2 deletions docs/src/pages/Upbit.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
2 changes: 1 addition & 1 deletion examples/Binance/CoinMFutures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ Binance.CoinMFutures.income_log(
startTime = DateTime("2023-06-22"),
endTime = DateTime("2023-07-23"),
limit = 1000,
)
)
2 changes: 1 addition & 1 deletion examples/Binance/USDMFutures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
)
8 changes: 4 additions & 4 deletions examples/Bybit/Spot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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(;
Expand All @@ -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)
10 changes: 6 additions & 4 deletions examples/Coinbase/Spot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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")
14 changes: 7 additions & 7 deletions src/Binance/CoinMFutures/API/Candle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
18 changes: 9 additions & 9 deletions src/Binance/CoinMFutures/API/ContinuousCandle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -118,4 +118,4 @@ function continuous_candle(client::BinanceClient = Binance.CoinMFutures.public_c
return continuous_candle(client, ContinuousCandleQuery(; kw...))
end

end
end
1 change: 0 additions & 1 deletion src/Binance/CoinMFutures/API/FundingRate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,3 @@ function funding_rate(client::BinanceClient = Binance.CoinMFutures.public_client
end

end

1 change: 0 additions & 1 deletion src/Binance/CoinMFutures/API/IncomeLog.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ end
| timestamp | DateTime | false | |
| signature | String | false | |
## Code samples:
```julia
Expand Down
1 change: 0 additions & 1 deletion src/Binance/CoinMFutures/API/OrderBook.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Gets current exchange orders.
| symbol | String | true | |
| limit | Int64 | false | |
## Code samples:
```julia
Expand Down
2 changes: 1 addition & 1 deletion src/Binance/CoinMFutures/API/Ticker.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ function ticker(client::BinanceClient = Binance.CoinMFutures.public_client; kw..
return ticker(client, TickerQuery(; kw...))
end

end
end
14 changes: 7 additions & 7 deletions src/Binance/Spot/API/Candle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
24 changes: 12 additions & 12 deletions src/Binance/Spot/API/DepositLog.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions src/Binance/Spot/API/ExchangeInfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 0 additions & 8 deletions src/Binance/Spot/API/OrderBook.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,13 @@ to_pretty_json(result.result)
"size":1478.6
},
...
{
"price":0.6439,
"size":1862.3
}
],
"bids":[
{
"price":0.6339,
"size":28448.6
},
...
{
"price":0.624,
"size":3339.8
}
],
"lastUpdateId":8394873195
}
Expand Down
24 changes: 12 additions & 12 deletions src/Binance/Spot/API/WithdrawalLog.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions src/Binance/USDMFutures/API/Candle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 8 additions & 8 deletions src/Binance/USDMFutures/API/ContinuousCandle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -118,4 +118,4 @@ function continuous_candle(client::BinanceClient = Binance.USDMFutures.public_cl
return continuous_candle(client, ContinuousCandleQuery(; kw...))
end

end
end
2 changes: 1 addition & 1 deletion src/Binance/USDMFutures/API/ExchangeInfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/Binance/USDMFutures/API/FundingRate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -80,4 +80,4 @@ function funding_rate(client::BinanceClient = Binance.USDMFutures.public_client;
return funding_rate(client, FundingRateQuery(; kw...))
end

end
end
16 changes: 8 additions & 8 deletions src/Binance/USDMFutures/API/LongShortRatio.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -93,4 +93,4 @@ function long_short_ratio(client::BinanceClient = Binance.USDMFutures.public_cli
return long_short_ratio(client, LongShortRatioQuery(; kw...))
end

end
end
Loading

0 comments on commit d996638

Please sign in to comment.