CCXT

CCXT vs the bitFlyer API

bitFlyer publishes no official client library. What CCXT's bitflyer class adds over hand-rolled HTTP: unified symbols, signing, rate limits and typed errors.

bitFlyer's Lightning API documentation is thorough — base endpoint, signature scheme, product codes and rate limits are all spelled out — but it lists no official client libraries. So the honest comparison here is not CCXT against a vendor SDK. It is CCXT against the HTTP client you would otherwise write yourself.

The question that decides between them: how much of that plumbing do you want to own?

TL;DR

  • Write it yourself if you need one or two endpoints, want zero dependencies, or need bitFlyer's Realtime API — which CCXT does not currently wrap.
  • Pick CCXT if you want signing, per-request pacing, unified symbols for FX_BTC_JPY and the expiring futures, typed errors and precision handling that already work, in seven languages.
  • Be aware of the gap. CCXT's bitflyer class is REST-only: it has no watch* methods, so live streaming from bitFlyer is not something CCXT does today.

At a glance

CCXTRaw bitFlyer Lightning API
Exchanges covered104 (bitFlyer is one of them)bitFlyer only
Official client libraryn/anone listed in bitFlyer's documentation
LanguagesTypeScript, JavaScript, Python, PHP, C#/.NET, Go, Java — one APIwhatever you write
Unified market data + trading APIyes — 16 capabilities, same names on every exchangeraw JSON from /v1/...
Symbols'BTC/JPY', 'BTC/JPY:JPY', 'BTC/JPY:JPY-YYMMDD'product codes: BTC_JPY, FX_BTC_JPY, BTCJPY11MAR2022
Regional market listshandled — getmarkets, getmarkets/usa, getmarkets/euyou pick the endpoint per region
Request signingbuilt in — ACCESS-KEY / ACCESS-TIMESTAMP / ACCESS-SIGN, HMAC-SHA256your code
Raw endpoint accessyes — 35 endpoints as implicit methodsyes, by definition
Built-in rate limiteryes, on by default (rateLimit 1000 ms)your code
Unified error typesyes — 41 typed exceptions in one hierarchyHTTP status + bitFlyer error payloads
WebSocketsnobitflyer has no watch* methodsyes — Socket.IO 2.0 and JSON-RPC 2.0 over WebSocket
Testnet / sandboxnot available for bitflyernot offered
Popularity43.8k GitHub stars · 4.8M PyPI + 494k npm installs/monthn/a
LicenceMITn/a
SupportDiscord, Telegram, GitHub issues — usually same-daybitFlyer support

Figures verified September 2026 against CCXT v4.5.77 and bitFlyer's published Lightning API and Realtime API documentation.

The same job, written both ways

Fetch a ticker

import ccxt

exchange = ccxt.bitflyer()
ticker = exchange.fetch_ticker('BTC/JPY')
print(ticker['last'], ticker['baseVolume'])

Two things the raw version leaves to you. The last traded price is ltp, not last. And there are two volume fields — volume and volume_by_product — where only the second is the base-asset volume for that product; CCXT maps that one to baseVolume so the number means the same thing here as on Binance or Kraken.

Place a limit order

import ccxt

exchange = ccxt.bitflyer({'apiKey': '...', 'secret': '...'})
order = exchange.create_order('BTC/JPY', 'limit', 'buy', 0.001, 12000000)
print(order['id'], order['status'])

That is the whole signing scheme: HMAC-SHA256 over the timestamp, HTTP method, path and body concatenated. It is not hard — it is just something you now own in every language your stack uses, along with the part where the body you sign must be byte-identical to the body you send.

Where the differences actually bite

Product codes are not symbols

bitFlyer's product codes carry the product type in the string. BTC_JPY is spot. FX_BTC_JPY is the perpetual. BTCJPY11MAR2022 is an expiring future, and it may also carry an alias like BTCJPY_MAT1WK meaning "the contract maturing in one week", which points at a different contract every week.

CCXT reads bitFlyer's market_type field and the alias, parses the expiry out of the code, and produces stable unified symbols:

bitFlyer product codemarket_typeCCXT symbol
BTC_JPYSpotBTC/JPY
ETH_BTCSpotETH/BTC
FX_BTC_JPYFXBTC/JPY:JPY
BTCJPY11MAR2022FuturesBTC/JPY:JPY-220311

Code that subscribes to "the weekly future" no longer has to re-resolve an alias by hand every Friday.

Three regional market lists

bitFlyer runs Japanese, US and EU entities, and the market list differs: getmarkets, getmarkets/usa and getmarkets/eu are three endpoints. CCXT's bitflyer class knows about all three, so load_markets() returns the right set and every later call uses ids from it.

Rate limits you do not have to model

bitFlyer publishes several limits at once: roughly 500 queries per 5 minutes per IP for the public API, 500 per 5 minutes for private API calls, a tighter 300 per 5 minutes on the order-placement and cancellation endpoints, and a separate cap of 100 placements per minute for orders of 0.1 or smaller. Modelling four overlapping budgets is exactly the kind of code that gets written once, badly, and then quietly throttles you in production.

CCXT ships a token-bucket throttler that is on by default (enableRateLimit = true, rateLimit = 1000 ms for bitFlyer) and maps rate-limit responses onto RateLimitExceeded.

Precision and string math

bitFlyer rejects orders that violate a product's size or price step. CCXT loads the market metadata and gives you amount_to_precision, price_to_precision and cost_to_precision, backed by the Precise string-arithmetic class so a quantity never drifts through float rounding into a rejection:

amount = exchange.amount_to_precision('BTC/JPY', 0.0012345678)
price = exchange.price_to_precision('BTC/JPY', 12345678.9)

One error hierarchy

CCXT maps bitFlyer's error payloads onto a typed exception treeInsufficientFunds, InvalidOrder, OrderNotFound, AuthenticationError, RateLimitExceeded, NetworkError, ExchangeNotAvailable and 34 more, all under BaseError. Raw HTTP gives you a status code and a JSON body whose shape you match on with string comparisons.

Derivatives and collateral are covered

Among the 16 capabilities CCXT implements for bitFlyer: fetch_positions, fetch_funding_rate, fetch_trading_fee, fetch_my_trades, fetch_orders, fetch_deposits and fetch_withdrawals. The FX and futures products have their own collateral endpoints on bitFlyer's side; CCXT's unified fetch_balance and fetch_positions cover the common ground with the same signatures they have on every other derivatives venue.

Seven languages, one API

import ccxt from 'ccxt';
const exchange = new ccxt.bitflyer ();
const ticker = await exchange.fetchTicker ('BTC/JPY');

A hand-rolled bitFlyer client is written once per language. CCXT is written once and transpiled to seven, so the signing code and the alias parsing are the same code everywhere.

Nothing is hidden — the implicit API

# any raw bitFlyer endpoint, camelCased from its path
health = exchange.public_get_gethealth()

All 35 endpoints CCXT models are reachable this way, with ACCESS-KEY / ACCESS-TIMESTAMP / ACCESS-SIGN signing, rate-limit accounting and error mapping applied. Browse them on the bitflyer implicit API page.

What the raw bitFlyer API does better

Honest, and the first one matters:

  • The Realtime API. bitFlyer publishes a streaming API supporting Socket.IO 2.0 and JSON-RPC 2.0 over WebSocket, with public and private channels. CCXT's bitflyer class has no watch* methods, so if you need live ticks, executions or board updates from bitFlyer, going direct is the only option of the two.
  • Endpoints CCXT does not model as unified methods. Chat, board state, collateral history and the exchange-health endpoints are all in the Lightning API. CCXT reaches them through implicit methods, but there is no unified wrapper with a stable cross-exchange shape.
  • Zero dependencies. The signature is four concatenated strings and an HMAC. If your program calls two endpoints, a hand-written client is a few dozen lines and no supply chain.
  • The documentation is the contract. Reading bitFlyer's reference and writing the request yourself means no translation layer between what the docs say and what your process sends — useful when you are debugging a rejected order.

If you need bitFlyer streaming, or you only need a couple of endpoints, going direct is the right call.

Migrating from raw bitFlyer HTTP to CCXT

What you are doingbitFlyer Lightning APICCXT
Symbolsproduct_code=BTC_JPY'BTC/JPY'
Perpetualproduct_code=FX_BTC_JPY'BTC/JPY:JPY'
MarketsGET /v1/getmarketsload_markets()
TickerGET /v1/gettickerfetch_ticker()
Order bookGET /v1/getboardfetch_order_book()
Public tradesGET /v1/getexecutionsfetch_trades()
Funding rateGET /v1/getfundingratefetch_funding_rate()
New orderPOST /v1/me/sendchildordercreate_order()
Cancel orderPOST /v1/me/cancelchildordercancel_order()
Open ordersGET /v1/me/getchildordersfetch_orders()
BalanceGET /v1/me/getbalancefetch_balance()
PositionsGET /v1/me/getpositionsfetch_positions()
My tradesGET /v1/me/getexecutionsfetch_my_trades()
Trading feeGET /v1/me/gettradingcommissionfetch_trading_fee()
SigningACCESS-KEY / ACCESS-TIMESTAMP / ACCESS-SIGN by handautomatic
StreamsRealtime APInot available in CCXT for bitflyer
Anything not listedthe endpointthe same endpoint as an implicit method

FAQ

Does bitFlyer have an official SDK? Its Lightning API documentation does not list one. Several third-party wrappers exist on GitHub in various languages, but they are community projects rather than exchange-published clients — which is why this page compares CCXT with the raw API instead.

Does CCXT support bitFlyer WebSockets? No. CCXT's bitflyer class is REST-only and has no watch* methods. CCXT Pro covers 76 of the 104 supported exchanges; bitFlyer is not currently one of them. bitFlyer's own Realtime API supports Socket.IO 2.0 and JSON-RPC 2.0 over WebSocket if you need streaming.

How does CCXT name bitFlyer's FX and futures products? FX_BTC_JPY becomes the unified swap symbol 'BTC/JPY:JPY', and an expiring contract such as BTCJPY11MAR2022 becomes 'BTC/JPY:JPY-220311'. CCXT parses the expiry from the product code — and from the _MAT1WK-style alias when one is present — so you do not track it by hand.

Does setSandboxMode work for bitFlyer? No. CCXT's bitflyer class does not declare sandbox URLs, so test with the smallest permitted order size on a low-balance key instead.

Can I still call bitFlyer-specific endpoints from CCXT? Yes — all 35 endpoints CCXT models are available as implicit methods, with signing and rate limiting applied.

Is CCXT free? Yes. MIT-licensed.

Next steps

On this page