-
Notifications
You must be signed in to change notification settings - Fork 1
/
Bitcointrade.py
29 lines (23 loc) · 1.28 KB
/
Bitcointrade.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import requests
import json
requisicao = requests.get('https://api.bitcointrade.com.br/v1/public/BTC/ticker')
print('*********BITCOIN TRADE*********')
print('-----------------------------------------------------')
cotacao = json.loads(requisicao.text)
print('BTC/USD: ', cotacao['data']['last'])
print('Buy: ', cotacao['data']['buy'], '<------> Sell: ',cotacao['data']['sell'] )
requisicao = requests.get('https://api.bitcointrade.com.br/v1/public/ETH/ticker')
print('-----------------------------------------------------')
cotacao = json.loads(requisicao.text)
print('ETH/BRL: ', cotacao['data']['last'])
print('Buy: ', cotacao['data']['buy'], '<------> Sell: ',cotacao['data']['sell'] )
requisicao = requests.get('https://api.bitcointrade.com.br/v1/public/LTC/ticker')
print('-----------------------------------------------------')
cotacao = json.loads(requisicao.text)
print('LTC/BRL: ', cotacao['data']['last'])
print('Buy: ', cotacao['data']['buy'], '<------> Sell: ',cotacao['data']['sell'] )
requisicao = requests.get('https://api.bitcointrade.com.br/v1/public/BCH/ticker')
print('-----------------------------------------------------')
cotacao = json.loads(requisicao.text)
print('BCH/BRL: ', cotacao['data']['last'])
print('Buy: ', cotacao['data']['buy'], '<------> Sell: ',cotacao['data']['sell'] )