This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ccxt | |
exchanges = { | |
"bitmex": { | |
"apiKey": "***", | |
"secret": "***" | |
}, | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ccxt | |
exchange = ccxt.bitmex() | |
ticker = bitmex().fetch_ticker('BTC/USD') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from pprint import pprint | |
def GetMarketAssetCode(marketID): | |
for data in coinIDInfoList: | |
if data["marketID"] == marketID: | |
return data["marketAssetCode"] | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import csv | |
api_key = "" #空白でOK | |
api_secret = "" #空白でOK | |
from binance.client import Client | |
client = Client(api_key, api_secret) | |
# 全銘柄取得 | |
ticker = client.get_ticker() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
from datetime import datetime | |
#URLの指定 | |
url = 'https://coinmarketcap.com/' | |
#ユーザージェントの設定 | |
headers = { | |
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import python_bitbankcc | |
API_KEY = 'APIキー' | |
API_SECRET = 'Secretキー' | |
prv = python_bitbankcc.private(API_KEY, API_SECRET) | |
balances = prv.get_asset() | |
for data in balances['assets']: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import python_bitbankcc | |
pub = python_bitbankcc.public() | |
value = pub.get_ticker( | |
'xrp_jpy' # ペア | |
) | |
print(value) | |
#現在の売り注文の最安値 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from coinmarketcap import Market | |
import json | |
market = Market() | |
coin = market.ticker("ethereum")[0] | |
#ドル建ての値段 | |
print('price_usd:'+coin['price_usd']) | |
#btc建ての値段 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from binance.client import Client | |
api_key = "***" | |
api_secret = "***" | |
client = Client(api_key, api_secret) | |
# 自分のアカウント情報を取得a | |
order_account_all = client.get_account().get("balances") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from binance.client import Client | |
#2018/1/9 修正 | |
api_key = "***" | |
api_secret = "***" | |
client = Client(api_key, api_secret) | |
NewerOlder