84 lines
2.3 KiB
Python
84 lines
2.3 KiB
Python
import libraries.balance_accounts as balance_accounts
|
|
from libraries.wrappers import earn_binance
|
|
from libraries.wrappers import earn_kucoin
|
|
from libraries.wrappers import earn_okx
|
|
from libraries.wrappers import earn_gateio
|
|
import json
|
|
|
|
kucoin = earn_kucoin.kucoin_earn()
|
|
binance = earn_binance.binance_earn()
|
|
okx = earn_okx.okx_earn()
|
|
gateio = earn_gateio.gateio_earn()
|
|
|
|
if __name__=="__main__":
|
|
|
|
'''
|
|
Subscribe workflow in Binance:
|
|
1. Get product id
|
|
2. Subscribe
|
|
|
|
Redeem workflow in Binance
|
|
1. Redeem with the same product id
|
|
'''
|
|
#print(binance.get_available_products("USDT"))
|
|
#print(binance.subscribe_product("USDT001", "10", auto_subscribe=False))
|
|
#print(binance.get_position("USDT"))
|
|
#print(binance.redeem_product("USDT001", amount="5.00000746"))
|
|
|
|
|
|
|
|
'''
|
|
Subscribe workflow in Kucoin
|
|
1. Get product id
|
|
2. Subscribe
|
|
|
|
Redeem workflow in Kucoin
|
|
1. Get ORDER id (the order id of the position)
|
|
2. Redeem
|
|
'''
|
|
#print(kucoin.get_available_products("USDT"))
|
|
#print(kucoin.subscribe_product("2152", "10"))
|
|
#print(kucoin.get_position("USDT"))
|
|
#print(kucoin.redeem_product(order_id="2987632", amount="20"))
|
|
|
|
|
|
'''
|
|
Subscribe workflow in OKX
|
|
1. Transfer funds to funding account
|
|
2. Confirm transfer via transfer_id
|
|
3. Subscribe
|
|
|
|
Redeem workflow in OKX
|
|
1. Reddem product (with coin, no id is required)
|
|
2. Transfer funds to trading account
|
|
3. Confirm transfer via transfer_id
|
|
|
|
'''
|
|
#print(okx.get_available_products("USDT"))
|
|
#print(okx.transfer_to_funding("USDT","10"))
|
|
#print(okx.get_transfer_state("1064007151"))
|
|
#print(okx.subscribe_product("USDT", "10"))
|
|
#print(okx.redeem_product("USDT", "20"))
|
|
#print(okx.transfer_to_trading("USDT", "20"))
|
|
#print(okx.get_transfer_state("1064008141"))
|
|
|
|
|
|
'''
|
|
Subscribe workflow in Gate.io
|
|
1. Get minimum rate
|
|
2. Subscribe product
|
|
3. Use get_account to confirm (request returns error?)
|
|
|
|
Redeem workflow in Gate.io
|
|
1. Reddem product
|
|
2. Use get_account to confirm (request returns error?)
|
|
'''
|
|
|
|
#print(gateio.get_min_rate("USDT"))
|
|
#print(gateio.redeem_product("USDT", "10", "0.00000452"))
|
|
#print(gateio.get_account())
|
|
pass
|
|
|
|
|
|
|