Skip to content

Commit

Permalink
Update example code
Browse files Browse the repository at this point in the history
  • Loading branch information
bmoscon committed Jan 7, 2024
1 parent 00ed971 commit 8b39603
Show file tree
Hide file tree
Showing 32 changed files with 35 additions and 36 deletions.
5 changes: 2 additions & 3 deletions examples/demo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand All @@ -8,7 +8,7 @@

from cryptofeed import FeedHandler
from cryptofeed.defines import CANDLES, BID, ASK, BLOCKCHAIN, FUNDING, GEMINI, L2_BOOK, L3_BOOK, LIQUIDATIONS, OPEN_INTEREST, PERPETUAL, TICKER, TRADES, INDEX
from cryptofeed.exchanges import (Binance, BinanceUS, BinanceFutures, Bitfinex, Bitflyer, AscendEX, Bitmex, Bitstamp, Bittrex, Coinbase, Gateio,
from cryptofeed.exchanges import (Binance, BinanceUS, BinanceFutures, Bitfinex, Bitflyer, AscendEX, Bitmex, Bitstamp, Coinbase, Gateio,
HitBTC, Huobi, HuobiDM, HuobiSwap, Kraken, OKCoin, OKX, Poloniex, Bybit, KuCoin, Bequant, Upbit, Probit)
from cryptofeed.exchanges.bitdotcom import BitDotCom
from cryptofeed.exchanges.bitget import Bitget
Expand Down Expand Up @@ -94,7 +94,6 @@ def main():
f.add_feed(Bithumb(symbols=['BTC-KRW'], channels=[TRADES], callbacks={TRADES: trade}))
f.add_feed(Bitmex(timeout=5000, symbols=Bitmex.symbols(), channels=[LIQUIDATIONS], callbacks={LIQUIDATIONS: liquidations, OPEN_INTEREST: oi, FUNDING: funding}))
f.add_feed(Bitstamp(channels=[L2_BOOK, TRADES], symbols=['BTC-USD'], callbacks={L2_BOOK: book, TRADES: trade}))
f.add_feed(Bittrex(subscription={L2_BOOK: ['BTC-USDT'], CANDLES: ['BTC-USDT', 'ETH-USDT'], TRADES: ['ETH-USDT', 'BTC-USDT'], TICKER: ['ETH-USDT']}, callbacks={CANDLES: candle_callback, L2_BOOK: book, TICKER: ticker, TRADES: trade}))
f.add_feed(BLOCKCHAIN, subscription={L2_BOOK: ['BTC-USD'], TRADES: Blockchain.symbols()}, callbacks={L2_BOOK: book, TRADES: trade})
f.add_feed(Bybit(symbols=['BTC-USDT-PERP', 'BTC-USD-PERP'], channels=[INDEX, FUNDING, OPEN_INTEREST], callbacks={OPEN_INTEREST: oi, INDEX: index, FUNDING: funding}))
f.add_feed(Bybit(candle_closed_only=True, symbols=['BTC-USDT-PERP', 'BTC-USD-PERP'], channels=[CANDLES, TRADES, L2_BOOK], callbacks={CANDLES: candle_callback, TRADES: trade, L2_BOOK: book}))
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_arctic.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_bequant_bitcoincom_hitbtc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_binance_delivery.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_binancetr.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_custom_agg.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_elastic.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_existing_loop.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_gateiofutures.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_gcppubsub.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
6 changes: 3 additions & 3 deletions examples/demo_influxdb.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand All @@ -13,8 +13,8 @@

INFLUX_ADDR = 'http://localhost:8086'
ORG = 'cryptofeed'
BUCKET = 'cryptofeed'
TOKEN = 'XXXXXXXXXX'
BUCKET = 'crypto'
TOKEN = 'TOKEN'


def main():
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_kafka.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_loop.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_mongo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_multicb.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_nbbo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_ohlcv.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_okx_authenticated.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_playback.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_postgres.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_questdb.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_rabbitmq_exchange.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_rabbitmq_queue.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_raw_data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_redis.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_renko.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_tcp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_throttle.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_udp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_uds.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_victoriametrics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_zmq.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Copyright (C) 2018-2023 Bryant Moscon - bmoscon@gmail.com
Copyright (C) 2018-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
Expand Down

0 comments on commit 8b39603

Please sign in to comment.