Ejemplo n.º 1
0
def create_test_bitfinex(
    database: DBHandler,
    msg_aggregator: MessagesAggregator,
    api_key: Optional[ApiKey] = None,
    secret: Optional[ApiSecret] = None,
) -> Bitfinex:
    if api_key is None:
        api_key = make_api_key()
    if secret is None:
        secret = make_api_secret()

    return Bitfinex(
        api_key=api_key,
        secret=secret,
        database=database,
        msg_aggregator=msg_aggregator,
    )
Ejemplo n.º 2
0
def create_test_bitfinex(
    database,
    msg_aggregator,
    api_key=None,
    secret=None,
) -> Bitfinex:
    if api_key is None:
        api_key = make_api_key()
    if secret is None:
        secret = make_api_secret()

    return Bitfinex(
        api_key=api_key,
        secret=secret,
        database=database,
        msg_aggregator=msg_aggregator,
    )
Ejemplo n.º 3
0
def test_name():
    exchange = Bitfinex('a', b'a', object(), object())
    assert exchange.name == str(Location.BITFINEX)
Ejemplo n.º 4
0
def test_name():
    exchange = Bitfinex('bitfinex1', 'a', b'a', object(), object())
    assert exchange.location == Location.BITFINEX
    assert exchange.name == 'bitfinex1'