def create_txn(asset, dt, price, amount):
 if (not isinstance(asset, Asset)):
  raise ValueError('pass an asset to create_txn')
 mock_order = Order(dt, asset, amount, id=None)
 return create_transaction(mock_order, dt, price, amount)

def create_txn ( asset , dt , price , amount ) : if ( not isinstance ( asset , Asset ) ) : raise ValueError ( 'pass an asset to create_txn' ) mock_order = Order ( dt , asset , amount , id = None ) return create_transaction ( mock_order , dt , price , amount )
create a fake transaction to be filled and processed prior to the execution of a given trade event .