def IO(api_key, api_secret, path, params):
     homiex = BrokerContractClient(entry_point=MyExchange.tread_url,
                                   api_key=api_key,
                                   secret=api_secret)
     ret_data = {'data': {}}
     if path == '1':
         raw_data = homiex.get_positions()
         ret_data = {'data': raw_data}
     if path == '2':
         raw_data = homiex.order_new(symbol=params['sym'],
                                     clientOrderId=int(time.time()),
                                     side=params['order_type'],
                                     orderType='LIMIT',
                                     priceType='MARKET',
                                     quantity=params['amt'],
                                     price=params['rat'],
                                     leverage=params['lever'],
                                     timeInForce='GTC',
                                     triggerPrice=None)
         if 'orderId' in raw_data:
             ret_data = {"data": {'id': raw_data['orderId']}}
         else:
             ret_data = raw_data
     return ret_data
        print(int(time.time() * 1000))

        print(b.broker_info())

        print(b.depth('CBTC-PERP-REV'))

        print(b.trades('CBTC-PERP-REV'))

        print(b.klines('CBTC-PERP-REV'))

        result = b.order_new(symbol='CBTC-PERP-REV',
                             clientOrderId=int(time.time()),
                             side='BUY_OPEN',
                             orderType='LIMIT',
                             quantity='2',
                             price='8000',
                             leverage='10',
                             timeInForce='GTC',
                             triggerPrice=None)

        print(result)

        order_id = result['orderId']

        print(order_id)

        print(b.order_cancel(order_id=order_id))

        print(b.open_orders(order_type='LIMIT'))