-
Notifications
You must be signed in to change notification settings - Fork 20
Add method WithdrawInfo for Bithumb #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Cors88
wants to merge
31
commits into
bhftbootcamp:master
Choose a base branch
from
Cors88:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
bf70664
Add method WithdrawInfo for Bithumb
Cors88 8b35196
Add method WithdrawInfo for Bithumb
Cors88 ef56417
Update WithdrawInfo.jl
Cors88 005f937
Update WithdrawInfo.jl
Cors88 0c33ad4
Update WithdrawInfo.jl
Cors88 8a621a5
Update WithdrawInfo.jl
Cors88 71d19a2
Update WithdrawInfo.jl
Cors88 a8b149b
Update WithdrawInfo.jl
Cors88 2e86fd8
Add method WithdrawInfo for Bithumb
Cors88 7aebc56
added end
Cors88 81bd339
fix
Cors88 5b5b3ac
Add method WithdrawInfo for Bithumb
Cors88 0743067
Add method WithdrawInfo for Bithumb
Cors88 ab72f0b
Update Bithumb.md
Cors88 99d39af
Add method WithdrawInfo for Bithumb
Cors88 6d18a36
Update src/Bithumb/Spot/API/WithdrawInfo.jl
Cors88 6d81b7a
Update src/Bithumb/Spot/API/WithdrawInfo.jl
Cors88 91acb77
Update src/Bithumb/Spot/API/WithdrawInfo.jl
Cors88 18e392c
Add method WithdrawInfo for Bithumb
Cors88 8bc14bc
Add method WithdrawInfo for Bithumb
Cors88 3b9d3af
Merge branch 'master' of https://github.com/Cors88/CryptoExchangeAPIs.jl
Cors88 ae824e4
Add method WithdrawInfo for Bithumb
Cors88 7c4f36f
Add method WithdrawInfo for Bithumb
Cors88 209d595
Update src/Bithumb/Bithumb.jl
Cors88 4764c76
Add method WithdrawInfo for Bithumb
Cors88 0cd01db
Update src/Bithumb/Spot/API/WithdrawInfo.jl
Cors88 3fa1eb8
Update src/Bithumb/Spot/API/WithdrawInfo.jl
Cors88 464821b
Update src/Bithumb/Spot/API/UserTransactions.jl
Cors88 13dd2a7
Update src/Bithumb/Spot/API/WithdrawInfo.jl
Cors88 a1c5427
Update src/Bithumb/Spot/API/WithdrawInfo.jl
Cors88 08396bc
Update src/Bithumb/Spot/API/WithdrawInfo.jl
Cors88 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,157 @@ | ||
| module WithdrawInfo | ||
|
|
||
| export WithdrawInfoQuery, | ||
| WithdrawInfoData, | ||
| withdraw_info | ||
|
|
||
| using Serde | ||
| using Dates, NanoDates, TimeZones | ||
|
|
||
| using CryptoExchangeAPIs.Bithumb | ||
| using CryptoExchangeAPIs.Bithumb: Data | ||
| using CryptoExchangeAPIs: Maybe, APIsRequest | ||
|
|
||
| Base.@kwdef mutable struct WithdrawInfoQuery <: BithumbPrivateQuery | ||
| currency::String | ||
| net_type::String | ||
|
|
||
| signature::Maybe{String} = nothing | ||
| end | ||
|
|
||
| struct MemberLevel <: BithumbData | ||
| security_level::Maybe{Int64} | ||
| fee_level::Maybe{Int64} | ||
| email_verified::Maybe{Bool} | ||
| identity_auth_verified::Maybe{Bool} | ||
| bank_account_verified::Maybe{Bool} | ||
| two_factor_auth_verified::Maybe{Bool} | ||
| locked::Maybe{Bool} | ||
| wallet_locked::Maybe{Bool} | ||
| end | ||
|
|
||
| struct Currency <: BithumbData | ||
| code::String | ||
| withdraw_fee::Float64 | ||
| is_coin::Bool | ||
| wallet_state::String | ||
| wallet_support::Vector{String} | ||
| end | ||
|
|
||
| struct Account <: BithumbData | ||
| currency::String | ||
| balance::Float64 | ||
| locked::Float64 | ||
| avg_buy_price::Float64 | ||
| avg_buy_price_modified::Bool | ||
| unit_currency::String | ||
| end | ||
|
|
||
| struct WithdrawLimit <: BithumbData | ||
| currency::String | ||
| minimum::Float64 | ||
| onetime::Float64 | ||
| daily::Float64 | ||
| remaining_daily::Float64 | ||
| fixed::Int64 | ||
| can_withdraw::Bool | ||
| remaining_daily_krw::Maybe{Float64} | ||
| end | ||
|
|
||
| struct WithdrawInfoData <: BithumbData | ||
| member_level::MemberLevel | ||
| currency::Currency | ||
| account::Account | ||
| withdraw_limit::WithdrawLimit | ||
| end | ||
|
|
||
| """ | ||
| withdraw_info(client::BithumbClient, query::WithdrawInfoQuery) | ||
| withdraw_info(client::BithumbClient; kw...) | ||
|
|
||
| Retrieves detailed information about the withdrawal capabilities for a specific currency on the Bithumb exchange. | ||
|
|
||
| [`GET /v1/withdraws/chance`](https://apidocs.bithumb.com/reference/%EC%B6%9C%EA%B8%88-%EA%B0%80%EB%8A%A5-%EC%A0%95%EB%B3%B4) | ||
|
|
||
Cors88 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ## Parameters: | ||
| | Parameter | Type | Required | Description | | ||
| |-------------|-----------|----------|--------------------------------------| | ||
| | currency | String | true | The currency code (e.g., "BTC"). | | ||
| | net_type | String | true | The network type (e.g., "BTC"). | | ||
|
|
||
| ## Code samples: | ||
| ```julia | ||
| using Serde | ||
| using CryptoExchangeAPIs.Bithumb | ||
|
|
||
| bithumb_client = Bithumb.Client(; | ||
| base_url = "https://api.bithumb.com", | ||
| public_key = ENV["BITHUMB_PUBLIC_KEY"], | ||
| secret_key = ENV["BITHUMB_SECRET_KEY"], | ||
| ) | ||
|
|
||
| result = Bithumb.Spot.withdraw_info( | ||
| bithumb_client; | ||
| currency = "BTC", | ||
| net_type = "BTC", | ||
| ) | ||
|
|
||
| to_pretty_json(result.result) | ||
| ``` | ||
|
|
||
| ## Result: | ||
|
|
||
| ```json | ||
| { | ||
| "member_level": { | ||
| "security_level": null, | ||
| "fee_level": null, | ||
| "email_verified": null, | ||
| "identity_auth_verified": null, | ||
| "bank_account_verified": null, | ||
| "two_factor_auth_verified": null, | ||
| "locked": null, | ||
| "wallet_locked": null | ||
| }, | ||
| "currency": { | ||
| "code": "BTC", | ||
| "withdraw_fee": "0.000108", | ||
| "is_coin": true, | ||
| "wallet_state": "working", | ||
| "wallet_support": [ | ||
| "deposit", | ||
| "withdraw" | ||
| ] | ||
| }, | ||
| "account": { | ||
| "currency": "BTC", | ||
| "balance": "124.45282908", | ||
| "locked": "0", | ||
| "avg_buy_price": "36341011", | ||
| "avg_buy_price_modified": false, | ||
| "unit_currency": "KRW" | ||
| }, | ||
| "withdraw_limit": { | ||
| "currency": "BTC", | ||
| "onetime": "6.01", | ||
| "daily": "160", | ||
| "remaining_daily": "160.00000000", | ||
| "remaining_daily_fiat": null, | ||
| "fiat_currency": null, | ||
| "minimum": "0.0001", | ||
| "fixed": 8, | ||
| "withdraw_delayed_fiat": null, | ||
| "can_withdraw": true, | ||
| "remaining_daily_krw": null | ||
| } | ||
| } | ||
| ``` | ||
| """ | ||
| function withdraw_info(client::BithumbClient, query::WithdrawInfoQuery) | ||
| return APIsRequest{WithdrawInfoData}("GET", "v1/withdraws/chance", query)(client) | ||
| end | ||
|
|
||
| function withdraw_info(client::BithumbClient; kw...) | ||
| return withdraw_info(client, WithdrawInfoQuery(; kw...)) | ||
| end | ||
|
|
||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.