-
-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
26 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
@@ -31,7 +31,7 @@ def teardown_module(module): | |
|
||
|
||
class TestBinanceRest: | ||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If not in the USA this should pass") | ||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If outside the USA this should pass") | ||
def test_trade(self): | ||
ret = [] | ||
for data in b.trades_sync('BTC-USDT'): | ||
|
@@ -44,7 +44,7 @@ def test_trade(self): | |
assert isinstance(ret[0]['amount'], Decimal) | ||
assert isinstance(ret[0]['timestamp'], float) | ||
|
||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If not in the USA this should pass") | ||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If outside the USA this should pass") | ||
def test_trades(self): | ||
expected = {'timestamp': 1577836800.594, | ||
'symbol': 'BTC-USDT', | ||
|
@@ -61,7 +61,7 @@ def test_trades(self): | |
assert ret[0] == expected | ||
assert ret[0]['timestamp'] < ret[-1]['timestamp'] | ||
|
||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If not in the USA this should pass") | ||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If outside the USA this should pass") | ||
def test_candles(self): | ||
expected = Candle( | ||
b.id, | ||
|
@@ -85,7 +85,7 @@ def test_candles(self): | |
assert len(ret) == 1 | ||
assert ret[0] == expected | ||
|
||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If not in the USA this should pass") | ||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If outside the USA this should pass") | ||
def test_bf_trade(self): | ||
expected = {'timestamp': 1577836801.481, | ||
'symbol': 'BTC-USDT-PERP', | ||
|
@@ -102,15 +102,15 @@ def test_bf_trade(self): | |
assert len(ret) == 3 | ||
assert ret[0] == expected | ||
|
||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If not in the USA this should pass") | ||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If outside the USA this should pass") | ||
def test_bf_trades(self): | ||
ret = [] | ||
for data in bf.trades_sync('BTC-USDT-PERP', start='2020-01-01 00:00:00', end='2020-01-01 1:00:00'): | ||
ret.extend(data) | ||
|
||
assert len(ret) == 2588 | ||
|
||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If not in the USA this should pass") | ||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If outside the USA this should pass") | ||
def test_bd_trade(self): | ||
expected = {'timestamp': 1609459200.567, | ||
'symbol': 'BTC-USD-PERP', | ||
|
@@ -127,7 +127,7 @@ def test_bd_trade(self): | |
assert len(ret) == 2 | ||
assert ret[0] == expected | ||
|
||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If not in the USA this should pass") | ||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If outside the USA this should pass") | ||
def test_bd_trades(self): | ||
ret = [] | ||
for data in bd.trades_sync('BTC-USD-PERP', start='2021-01-01 00:00:00', end='2021-01-01 1:00:00'): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
@@ -11,7 +11,7 @@ | |
from cryptofeed.exchanges import Binance | ||
|
||
|
||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If not in the USA this should pass") | ||
@pytest.mark.xfail(reason="Binance blocks build machine IP ranges. If outside the USA this should pass") | ||
def test_binance_address_generation(): | ||
symbols = Binance.symbols() | ||
channels = [channel for channel in Binance.info()['channels']['websocket'] if not Binance.is_authenticated_channel(channel)] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
@@ -9,7 +9,7 @@ | |
|
||
import pytest | ||
|
||
from cryptofeed.defines import ASCENDEX, ASCENDEX_FUTURES, BEQUANT, BITDOTCOM, BITGET, BITHUMB, CANDLES, BINANCE, BINANCE_DELIVERY, CRYPTODOTCOM, DELTA, FMFW, BITFINEX, DYDX, EXX, BINANCE_FUTURES, BINANCE_US, BITFLYER, BITMEX, BITSTAMP, BITTREX, BLOCKCHAIN, COINBASE, DERIBIT, GATEIO, GEMINI, HITBTC, HUOBI, HUOBI_DM, HUOBI_SWAP, INDEPENDENT_RESERVE, KRAKEN, KRAKEN_FUTURES, KUCOIN, L3_BOOK, OKCOIN, OKX, PHEMEX, POLONIEX, PROBIT, TICKER, TRADES, L2_BOOK, BYBIT, UPBIT, BINANCE_TR, GATEIO_FUTURES | ||
from cryptofeed.defines import ASCENDEX, ASCENDEX_FUTURES, BEQUANT, BITDOTCOM, BITGET, BITHUMB, CANDLES, BINANCE, BINANCE_DELIVERY, CRYPTODOTCOM, DELTA, FMFW, BITFINEX, DYDX, EXX, BINANCE_FUTURES, BINANCE_US, BITFLYER, BITMEX, BITSTAMP, BLOCKCHAIN, COINBASE, DERIBIT, GATEIO, GEMINI, HITBTC, HUOBI, HUOBI_DM, HUOBI_SWAP, INDEPENDENT_RESERVE, KRAKEN, KRAKEN_FUTURES, KUCOIN, L3_BOOK, OKCOIN, OKX, PHEMEX, POLONIEX, PROBIT, TICKER, TRADES, L2_BOOK, BYBIT, UPBIT, BINANCE_TR, GATEIO_FUTURES | ||
from cryptofeed.exchanges import EXCHANGE_MAP | ||
from cryptofeed.raw_data_collection import playback | ||
from cryptofeed.symbols import Symbols | ||
|
@@ -30,11 +30,11 @@ | |
BITFLYER: {L2_BOOK: 749, TICKER: 249, TRADES: 162}, | ||
ASCENDEX: {L2_BOOK: 279, TRADES: 4}, | ||
ASCENDEX_FUTURES: {L2_BOOK: 261, TRADES: 12}, | ||
BITDOTCOM: {L2_BOOK: 46, TICKER: 61}, | ||
BITDOTCOM: {L2_BOOK: 1042, TICKER: 124, TRADES: 6}, | ||
BITGET: {CANDLES: 10060, L2_BOOK: 637, TICKER: 345, TRADES: 555}, | ||
BITMEX: {L2_BOOK: 1979, TICKER: 436, TRADES: 27}, | ||
BITSTAMP: {TRADES: 10, L2_BOOK: 627}, | ||
BITTREX: {TICKER: 162, CANDLES: 20, L2_BOOK: 1014}, | ||
#BITTREX: {TICKER: 162, CANDLES: 20, L2_BOOK: 1014}, | ||
BLOCKCHAIN: {L2_BOOK: 78}, | ||
BYBIT: {TRADES: 251, L2_BOOK: 4278}, | ||
COINBASE: {L2_BOOK: 9729, TICKER: 107, TRADES: 107}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
''' | ||
Copyright (C) 2017-2023 Bryant Moscon - [email protected] | ||
Copyright (C) 2017-2024 Bryant Moscon - [email protected] | ||
Please see the LICENSE file for the terms and conditions | ||
associated with this software. | ||
|