Bithumb

CryptoExchangeAPIs.Bithumb.BithumbClientType
BithumbClient <: AbstractAPIsClient

Client info.

Required fields

  • base_url::String: Base URL for the client.

Optional fields

  • public_key::String: Public key for authentication.
  • secret_key::String: Secret key for authentication.
  • interface::String: Interface for the client.
  • proxy::String: Proxy information for the client.
  • account_name::String: Account name associated with the client.
  • description::String: Description of the client.
source
CryptoExchangeAPIs.Bithumb.BithumbAPIErrorType
BithumbAPIError{T} <: AbstractAPIsError

Exception thrown when an API method fails with code T.

Required fields

  • status::Int64: Error status code.

Optional fields

  • message::String: Error message.
source
CryptoExchangeAPIs.Bithumb.DataType
Data{D<:Union{A,Vector{A},Dict{String,A}} where {A<:AbstractAPIsData}} <: AbstractAPIsData

Required fields

  • status::String: Request status.
  • data::D: Request result data.

Optional fields

  • date::NanoDate: Current time.
source

Spot

CryptoExchangeAPIs.Bithumb.Spot.AssetStatus.asset_statusFunction
asset_status(client::BithumbClient, query::AssetStatusQuery)
asset_status(client::BithumbClient = Bithumb.Spot.public_client; kw...)

Provides information on the deposit/withdrawal status of virtual assets.

GET /public/assetsstatus/multichain/{currency}

Parameters:

ParameterTypeRequiredDescription
currencyStringfalseDefault: "ALL"

Code samples:

using Serde
using CryptoExchangeAPIs.Bithumb

result = Bithumb.Spot.asset_status(; 
    currency = "ADA",
)

to_pretty_json(result.result)

Result:

{
  "status":"0000",
  "date":null,
  "data":[
    {
      "currency":"ADA",
      "net_type":"ADA",
      "deposit_status":true,
      "withdrawal_status":true
    }
  ]
}
source
CryptoExchangeAPIs.Bithumb.Spot.Candle.candleFunction
candle(client::BithumbClient, query::CandleQuery)
candle(client::BithumbClient = Bithumb.Spot.public_client; kw...)

Provides virtual asset price and trading volume information by time and section.

GET public/candlestick/{order_currency}_{payment_currency}/{chart_intervals}

Parameters:

ParameterTypeRequiredDescription
order_currencyStringtrue
payment_currencyStringtrue
intervalTimeIntervaltruem1 m3 m5 m10 m30 h1 h6 h12 h24

Code samples:

using Serde
using CryptoExchangeAPIs.Bithumb

result = Bithumb.Spot.candle(;
    order_currency = "BTC",
    payment_currency = "KRW",
    interval = Bithumb.Spot.Candle.h24,
)

to_pretty_json(result.result)

Result:

{
  "status":"0000",
  "date":null,
  "data":[
    {
      "timestamp":"2024-05-14T15:00:00",
      "open":8.6639e7,
      "close":8.6419e7,
      "high":8.6845e7,
      "low":8.575e7,
      "vol":216.48937355
    },
    ...
  ]
}
source
CryptoExchangeAPIs.Bithumb.Spot.Market.marketFunction
market(client::BithumbClient, query::MarketQuery)
market(client::BithumbClient = Bithumb.Spot.public_client; kw...)

List of markets available for trading on Bithumb.

GET v1/market/all

Parameters:

ParameterTypeRequiredDescription
isDetailsBoolfalse

Code samples:

using Serde
using CryptoExchangeAPIs.Bithumb

result = Bithumb.Spot.market()

to_pretty_json(result.result)

Result:

[
  {
    "market":"KRW-BTC",
    "korean_name":"비트코인",
    "english_name":"Bitcoin"
  },
  {
    "market":"KRW-ETH",
    "korean_name":"이더리움",
    "english_name":"Ethereum"
  },
  ...
]
source
CryptoExchangeAPIs.Bithumb.Spot.OrderBook.order_bookFunction
order_book(client::BithumbClient, query::OrderBookQuery)
order_book(client::BithumbClient = Bithumb.Spot.public_client; kw...)

Provides exchange quote information.

GET /public/orderbook/{order_currency}_{payment_currency}

Parameters:

ParameterTypeRequiredDescription
payment_currencyStringtrue
countInt64false
order_currencyStringfalseDefault: "ALL"

Code samples:

using Serde
using CryptoExchangeAPIs.Bithumb

result = Bithumb.Spot.order_book(;
    order_currency = "BTC",
    payment_currency = "KRW",
    count = 5,
)

to_pretty_json(result.result)

Result:

{
  "status":"0000",
  "date":null,
  "data":{
    "asks":[
      {
        "price":8.6553e7,
        "quantity":0.0011
      },
      ...
    ],
    "bids":[
      {
        "price":8.6502e7,
        "quantity":0.0393
      },
      ...
    ],
    "order_currency":"BTC",
    "payment_currency":"KRW",
    "timestamp":"2024-05-14T22:40:07.140999936"
  }
}
source
CryptoExchangeAPIs.Bithumb.Spot.Ticker.tickerFunction
ticker(client::BithumbClient, query::TikerQuery)
ticker(client::BithumbClient = Bithumb.Spot.public_client; kw...)

Provides information on the current price of virtual assets at the time of request.

GET /public/ticker/{order_currency}_{payment_currency}

Parameters:

ParameterTypeRequiredDescription
payment_currencyStringtrue
order_currencyStringfalseDefault: "ALL"

Code samples:

using Serde
using CryptoExchangeAPIs.Bithumb

result = Bithumb.Spot.ticker(;
    order_currency = "BTC",
    payment_currency = "KRW",
)

to_pretty_json(result.result)

Result:

{
  "status":"0000",
  "date":null,
  "data":{
    "acc_trade_value":1.873153488545703e10,
    "acc_trade_value_24H":7.510337464461333e10,
    "closing_price":8.6533e7,
    "date":"2024-05-14T22:41:49.334000128",
    "fluctate_24H":-1.097e6,
    "fluctate_rate_24H":-1.25,
    "max_price":8.6845e7,
    "min_price":8.575e7,
    "opening_price":8.6639e7,
    "prev_closing_price":8.6659e7,
    "units_traded":217.39853891,
    "units_traded_24H":866.46583706
  }
}
source
CryptoExchangeAPIs.Bithumb.Spot.UserTransactions.user_transactionsFunction
user_transactions(client::BithumbClient, query::UserTransactionsQuery)
user_transactions(client::BithumbClient; kw...)

Provides information on member transaction completion details.

POST /info/user_transactions

Parameters:

ParameterTypeRequiredDescription
order_currencyStringtrue
payment_currencyStringtrue
countInt64falseDefault: 20
offsetInt64false
searchGbSearchStatusfalseALL (0), BUY_COMPLETED (1), SELL_COMPLETED (2), WITHDRAWAL (3), DEPOSIT (4), RECALL (5), DEPOSITING_KRW (9)
nonceDateTimefalse
endpointStringfalse
signatureStringfalse

Code samples:

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.user_transactions(
    bithumb_client;
    order_currency = "BTC",
    payment_currency = "KRW",
)

to_pretty_json(result.result)

Result:

{
  "status": "0000",
  "date":null,
  "data": [
    {
      "search":1,
      "transfer_date":"2019-10-28T11:44:57.148",
      "order_currency":"BTC",
      "payment_currency":"KRW",
      "units":0.0001,
      "price":10000000.0,
      "amount":1000.0,
      "fee_currency":"KRW",
      "fee":2.5,
      "order_balance":6.498881591872,
      "payment_balance":1140499718.0
    },
    ...
  ]
}
source