How to use flumine - 10 common examples

To help you get started, we’ve selected a few flumine 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 liampauling / flumine / tests / test_orderpackage.py View on Github external
def test_order_limit(self):
        self.assertEqual(self.order_package.order_limit(OrderPackageType.PLACE), 200)
        self.assertEqual(self.order_package.order_limit(OrderPackageType.CANCEL), 60)
        self.assertEqual(self.order_package.order_limit(OrderPackageType.UPDATE), 60)
        self.assertEqual(self.order_package.order_limit(OrderPackageType.REPLACE), 60)
github liampauling / flumine / tests / test_orderpackage.py View on Github external
def test_order_limit(self):
        self.assertEqual(self.order_package.order_limit(OrderPackageType.PLACE), 200)
        self.assertEqual(self.order_package.order_limit(OrderPackageType.CANCEL), 60)
        self.assertEqual(self.order_package.order_limit(OrderPackageType.UPDATE), 60)
        self.assertEqual(self.order_package.order_limit(OrderPackageType.REPLACE), 60)
github liampauling / flumine / tests / test_orderpackage.py View on Github external
def test_order_limit(self):
        self.assertEqual(self.order_package.order_limit(OrderPackageType.PLACE), 200)
        self.assertEqual(self.order_package.order_limit(OrderPackageType.CANCEL), 60)
        self.assertEqual(self.order_package.order_limit(OrderPackageType.UPDATE), 60)
        self.assertEqual(self.order_package.order_limit(OrderPackageType.REPLACE), 60)
github liampauling / flumine / tests / test_ordertype.py View on Github external
def test_init(self):
        self.assertEqual(self.order_type.EXCHANGE, ExchangeType.BETFAIR)
        self.assertEqual(self.order_type.ORDER_TYPE, OrderTypes.MARKET_ON_CLOSE)
        self.assertEqual(self.order_type.liability, 128)
github liampauling / flumine / tests / test_ordertype.py View on Github external
def test_init(self):
        self.assertEqual(self.order_type.EXCHANGE, ExchangeType.BETFAIR)
        self.assertEqual(self.order_type.ORDER_TYPE, OrderTypes.LIMIT)
        self.assertEqual(self.order_type.price, 1.01)
        self.assertEqual(self.order_type.size, 2)
        self.assertEqual(self.order_type.persistence_type, "PERSIST")
        self.assertEqual(self.order_type.time_in_force, "YES")
        self.assertEqual(self.order_type.min_fill_size, 34.5)
        self.assertEqual(self.order_type.bet_target_type, "NO")
        self.assertEqual(self.order_type.bet_target_size, 2)
github liampauling / flumine / tests / test_execution.py View on Github external
def test_init(self):
        self.assertEqual(self.execution.EXCHANGE, ExchangeType.BETFAIR)
github liampauling / flumine / tests / test_orderpackage.py View on Github external
def test_order_limit(self):
        self.assertEqual(self.order_package.order_limit(OrderPackageType.PLACE), 200)
        self.assertEqual(self.order_package.order_limit(OrderPackageType.CANCEL), 60)
        self.assertEqual(self.order_package.order_limit(OrderPackageType.UPDATE), 60)
        self.assertEqual(self.order_package.order_limit(OrderPackageType.REPLACE), 60)
github liampauling / flumine / tests / test_simulated.py View on Github external
def test_size_remaining_non_limit(self):
        self.simulated.order.order_type.liability = 2
        self.simulated.order.order_type.ORDER_TYPE = OrderTypes.LIMIT_ON_CLOSE
        self.assertEqual(self.simulated.size_remaining, 0)
github liampauling / flumine / tests / test_ordertype.py View on Github external
def test_init(self):
        self.assertEqual(self.order_type.EXCHANGE, ExchangeType.BETFAIR)
        self.assertEqual(self.order_type.ORDER_TYPE, OrderTypes.LIMIT_ON_CLOSE)
        self.assertEqual(self.order_type.liability, 64)
        self.assertEqual(self.order_type.price, 1.01)
github liampauling / flumine / tests / test_order.py View on Github external
def test__update_status(self, mock_info):
        self.order._update_status(OrderStatus.EXECUTION_COMPLETE)
        self.assertEqual(self.order.status_log, [OrderStatus.EXECUTION_COMPLETE])
        self.assertEqual(self.order.status, OrderStatus.EXECUTION_COMPLETE)