I have a json file /content/f-migrated-2024-09-30_10-38-48.json that have informations about availables currencies in some crypto exchanges and their available blockchains and deposit withdraw status/fees related infos and also available pairs for trade that currencies in that exchanges and theire dex (decentralized exchange like uniswap) prices in usd for theire related blockchains
Its purpose is to store needed data for arbitrage opportunities calculator code.
Example json:
[
    {
        "kucoin": {
            "eth": {
                "FET": {
                    "deposit_status": "deposit allowed",
                    "min_deposit_amt": "9.0",
                    "num_of_confirmations": "64.0",
                    "withdraw_status": "withdraw allowed",
                    "min_withdraw_amt": "9.2",
                    "transact_fee_withdraw": "4.6",
                    "estimated_deposit_time": "960.0",
                    "withdraw_currency": "FET",
                    "contract": "0xaea46a60368a7bd060eec7df8cba43b7ef41ad85",
                    "contract_from_quotes": "0xaea46A60368A7bD060eec7DF8CBa43b7EF41Ad85",
                    "price": "1.55832016870648",
                    "pairs": {
                        "FET/USDT": {
                            "bid_price": "1.5579",
                            "bid_volume": "406.6119",
                            "ask_price": "1.5583",
                            "ask_volume": "406.7163"
                        },
                        "FET/BTC": {
                            "bid_price": "2.4127e-05",
                            "bid_volume": "0.006297147",
                            "ask_price": "2.4193e-05",
                            "ask_volume": "0.0176005574966"
                        },
                        "FET/ETH": {
                            "bid_price": "0.0005913",
                            "bid_volume": "0.61185843666",
                            "ask_price": "0.00059311",
                            "ask_volume": "0.012716278400000001"
                        }
                    }
                },...
            },
            "bsc": {
                "MTV": {
                    "deposit_status": "deposit suspended",
                    "min_deposit_amt": "500000000.0",
                    "num_of_confirmations": "32.0",
                    "withdraw_status": "withdraw suspended",
                    "min_withdraw_amt": "1400.0",
                    "transact_fee_withdraw": "700.0",
                    "estimated_deposit_time": "96.0",
                    "withdraw_currency": "MTV",
                    "contract": "0x8aa688ab789d1848d131c65d98ceaa8875d97ef1",
                    "contract_from_quotes": "0x8aa688ab789d1848d131c65d98ceaa8875d97ef1",
                    "price": "0.0006255002752384",
                    "pairs": {
                        "MTV/USDT": {
                            "bid_price": "0.0006497",
                            "bid_volume": "41.29186675830999",
                            "ask_price": "0.0006555",
                            "ask_volume": "81.66445941365001"
                        },
                        "MTV/BTC": {
                            "bid_price": "9.69e-09",
                            "bid_volume": "0.00483413341536",
                            "ask_price": "1.047e-08",
                            "ask_volume": "0.0010333570565490002"
                        },
                        "MTV/ETH": {
                            "bid_price": "2.343e-07",
                            "bid_volume": "0.01008896933025",
                            "ask_price": "2.568e-07",
                            "ask_volume": "0.042378504019290004"
                        }
                    }
                },...
            },...
        },
        "xt": {
            "bsc": {
                "BNB": {
                    "deposit_status": "deposit allowed",
                    "min_deposit_amt": "500000000.0",
                    "num_of_confirmations": "32.0",
                    "withdraw_status": "withdraw allowed",
                    "min_withdraw_amt": "0.018",
                    "transact_fee_withdraw": "0.0009",
                    "estimated_deposit_time": "96.0",
                    "withdraw_currency": "bnb",
                    "contract": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
                    "contract_from_quotes": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
                    "price": "577.24170549322",
                    "pairs": {
                        "BNB/USDT": {
                            "bid_price": "577.1",
                            "bid_volume": "4889.1936000000005",
                            "ask_price": "577.4",
                            "ask_volume": "71.5976"
                        }
                    }
                },......
........

I have other json file /content/usd-eq-2024-09-30-12-35-32.json that have cex exchanges quote market currencies prices in usd example structure
{
    "code": "200000",
    "data": {
        "BTC": "63838.2155399476616006",
        "SOL": "155.9364047999988962",
        "BNB": "574.5595382999979242",
        "ETH": "2628.8970839998958221",
        "USDT": "0.9999000000000000",
        "KCS": "8.0901909000000004",
        "TRX": "0.1555844400000000"
    }
}
generate code that Read the jsons , calculate arbitrage opportunities from cex to dex and from dex to cex, dont forget to include this functions: 

Cex to dex:
Start balance is 100usd,
look for path with withdraw status: "withdraw allowed"... for exchange in exchanges: convert Start balance to market (quote in quotes) currency using usd-eq json, decrease trading fees percent 2 times for that exchange, convert result volume in quote to base (base in bases), decrease withdraw fees... decrease swap fees... after that, convert result volume in base to usd by using "price" key in f-migrated json... check if result balance in usd >  start balance in usd... if profit print and save arbitrage to result file with current datetime.

Dex to cex:
Start balance is 100usd, 
look for path with withdraw status: "deposit allowed"... decrease swap fees for network in networks, decrease blockchain transfer fees for that network, convert Start balance to swaped-currency balance using 'price' key specefied for every currency in every network in every exchange, convert result swaped-currency balance to market currency in market currencies... decrease trade fees percent 2 times... convert result to usd using eq-usd json related data... (quote in quotes) currency using usd-eq json, if result in usd > start balance print and save arbitrage to result file. 

trading_fees = {
    'kucoin': 0.001,
    'xt': 0.002,
    'bitmex': 0.001,
}

swap_fees = {
    'eth': 15,
    'arbitrum': 3,
    'ton': 0.1,
    'ftm': 0.1,
    'zksync': 3,
    'avax': 3,
    'bsc': 0.31,
    'optimism': 3,
    'flare': 3,
    'movr': 0.5,
    'solana': 0.25,
    'base': 2.5,
    'polygon_pos': 0.5,
    'kava': 0.001,
}

blockchain_transfer_fees = {
    'eth': 10,
    'arbitrum': 1,
    'ton': 0.035,
    'ftm': 0.01,
    'zksync': 0.3,
    'avax': 1,
    'bsc': 0.13,
    'optimism': 1,
    'flare': 0.5,
    'movr': 0.3,
    'solana': 0.03,
    'base': 2.1,
    'polygon_pos': 0.3,
    'kava': 0.0001,
}