How to use the tensortrade.exchanges.get function in tensortrade

To help you get started, we’ve selected a few tensortrade examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github notadamking / tensortrade / tests / tensortrade / exchanges / test_injection.py View on Github external
def test_injects_string_initialized_action_scheme():

    with TradingContext(**config):

        exchange = get('simulated')

        assert hasattr(exchange.context, 'credentials')
        assert exchange.context.credentials == config['exchanges']['credentials']
        assert exchange.context['credentials'] == config['exchanges']['credentials']
github notadamking / tensortrade / tests / tensortrade / test_component_registration.py View on Github external
def test_simulated_exchange():
    assert isinstance(exchanges.get('simulated'), SimulatedExchange)
github notadamking / tensortrade / tests / tensortrade / test_component_registration.py View on Github external
def test_stochastic_exchange():
    assert isinstance(exchanges.get('stochastic'), StochasticExchange)
github notadamking / tensortrade / tests / tensortrade / exchanges / test_exchange.py View on Github external
def test_injects_string_initialized_action_scheme():

    with TradingContext(**config):

        exchange = get('simulated')

        assert hasattr(exchange.context, 'credentials')
        assert exchange.context.credentials == config['exchanges']['credentials']
        assert exchange.context['credentials'] == config['exchanges']['credentials']
github notadamking / tensortrade / tests / tensortrade / test_component_registration.py View on Github external
def test_ccxt_exchanges():
    for exchange_id in ['coinbasepro', 'coinbase', 'binance', 'bitstamp']:
        assert isinstance(exchanges.get(exchange_id), CCXTExchange)
github notadamking / tensortrade / tensortrade / environments / trading_environment.py View on Github external
def exchange(self, exchange: Union[Exchange, str]):
        self._exchange = exchanges.get(exchange) if isinstance(exchange, str) else exchange

        self._broker = Broker(self._exchange)