LoginSignup
3
3

More than 5 years have passed since last update.

ビットコインの現在価格を表示する

Last updated at Posted at 2017-11-23

coincheck の公開APIがめちゃくちゃ使い勝手がよかった。

import urllib.request
import json

with urllib.request.urlopen('http://coincheck.com/api/ticker') as response:
   res = response.read()
   d = json.loads(res.decode('utf-8'))
   print(d['last'])

Python は細部に渡ってきちんとしているところが気持ち良い。最高。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3