示例#1
0
from lib.config import Config

config = Config()
creds = config.credentials("okex.json")

api_key = creds['apiKey']
pass_phrase = creds['passPhrase']
secret_key = creds['secretKey']
示例#2
0
from lib.config import Config
from binance.client import Client
from binance.websockets import BinanceSocketManager
import requests
import hmac
import time
from urllib.parse import urlencode
import hashlib
from binance.exceptions import BinanceAPIException

config = Config()
credentials = config.credentials("binance.json")

api_key = credentials['apiKey']
api_secret = credentials['secret']


def create_client():
    return Client(api_key, api_secret)


def create_ws():
    client = create_client()
    return BinanceSocketManager(client)


def normalize_pair(pair):
    return pair.replace('-', '')


def get_fees():