-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquestion1.py
30 lines (25 loc) · 874 Bytes
/
question1.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
30
"""
Print the top 5 symbols with quote asset BTC
and the highest volume over the last 24 hours in descending order.
"""
import logging
from binance.lib.utils import config_logging
from binance.spot import Spot as Client
from my_key import api_access_key
from my_key import api_secret_key
from utils.marketApi import exchange_info_with_specific_quoteAccess
from utils.marketApi import historical_trades_in_24hrs
from utils.transform import find_top_5
config_logging(logging, logging.ERROR)
# -------------------------------------------------
# Put it all together
# -----------------------------------------------
if __name__ == "__main__":
spot_client = Client(key=api_access_key, secret=api_secret_key)
find_top_5(
exchange_info_with_specific_quoteAccess,
historical_trades_in_24hrs,
"BTC",
spot_client,
"volume",
)