Пример #1
0
        async def run_test():

            market = 'okex'
            pair = 'no_pair'

            lib = BitsgapClient(public_key, private_key)

            result = lib.last_price(market, pair)

            logging.debug(result)

            self.assertTrue(result['status'] == 'error')
            self.assertIn('message', result)

            await asyncio.sleep(1)
Пример #2
0
        async def run_test():

            market = 'okex'
            pair = 'ETH_BTC'

            lib = BitsgapClient(public_key, private_key)

            result = lib.last_price(market, pair)

            logging.debug(result)

            self.assertTrue(result['status'] == 'ok')
            self.assertIn('data', result)

            data = result['data']

            self.assertIn('ask', data)
            self.assertIn('bid', data)

            await asyncio.sleep(1)