How to create BTC trading systems with bitFlyer’s API(get rate, account info and trade)

As you may know, bitFlyer is one of the most popular BTC trading companis in Japan and its volume is very big! Today, I wanna talk about how to use the API. But don’t worry. There’s nothing to worry about it. It’s very easy. …maybe

First, check the link below.

It’s bitFlyer API documentation. I hope you read before you come here. There is a sample written by Javascript but if you wanna sell or give your software, Javascript is not so good as you think.

You might think it unusual but I coded my system in PHP. Cos I’m not good at Javascript and the reason as I mentioned.

How to get BTC rate

To get BTC rate is the easiest method. Just use HTTP request to the URL.
The array name is unusual as compared to other companies so I changed the array best_ask -> ask.

This is Public method so you don’t have to use your API key nor hash.

How to get account info

In order to get your account info, you have to have your API key. I won’t talk about how to get API key on your account page here.

This method is Private method. In other words, you have to use hash and some options.

Anyway, all you have to do is use the code below.

Just change the API key to yours. You can re-code this into function or use this as it is. The last “echo” is just for debugging. If you don’t need it, then just delete it.

Trading method

I made a function for easy use.

If you want to change the tradinglot, change $orderamount.
$ordertype must be “BUY” or “SELL”.
$orderrate should be current BTC rate but if it’s MARKET order it’s not required.(You can use 0)

In documentation, Nonce must be UNIX time stamp. However when I check it ok to use Unix mili timestamp, it was OK. So, if you’are trying fast trading, mili timestamp must be better I think.

And, HTTP request is POST this time.

Where the server location

bitFlyer’s server location is Kansas even if a Japanese trader uses. So, if you gonna use VPS or other dedicated server, datacentre in Kansas is better although these days bitFlyer’s server is very bad as you may know.

I wrote about it before
(Sorry, it’s in Japanese)

By the way, I made a BTC arbitrage trading system among bitFlyer, CoinCheck and ZAIF. If you’re interested, please contact info_at_fxantenna.com.





Which Japanese company(bitFlyer,CoinCheck,ZAIF) is the best when you use API?

Last year, I made a BTC arbitrage system among bit



ビットコインチャートを表示できるMT4業者が増えてきたということですが、 現物でアービトラージをす


使用言語と方向性 仮想通貨の自動売買開発①

公開:2017/6/21 仮想通貨の自動売買プログラムを書く前に、そもそもどうやってプログラムと取


ETH(イーサリアム)のアービトラージの取引結果(Binance vs Poloniex)







  • (↑広告です。このサイトの管理者の運営ではありません)

  • 横瀬兼元(ペンネーム)です。

no image

. . 超シンプルなMACDのEAです


1分足っていうのは他の時間枠といろいろ違う点があります。 まず、本題か

no image
【EA検証班募集】コツコツドカンとドローダウン(MT4) ~原理は単純を、構造は複雑を、人は最も人らしく~

EURGBP 2018.11.1~2019.4.30 D1 Sp



FX業界の人種マップとその特徴 LP、ホワイトラベル、商材屋さん、開発代行…