INNER CODE UNIT · Python

enter_position

liamhartley/cryptotradingbot · trading_strategies/poloniex_cmo_trading_strategy/app/app.py:53

def enter_position(poloniex_wrapper, pair, rate, amount):
    '''

    :param currency_pair: A string that defines the market, "USDT_BTC" for example.
    :param rate: The price. Units are market quote currency. Eg USDT_BTC market, the value of this field would be around 10,000. Naturally this will be dated quickly but should give the idea.
    :param amount: The total amount offered in this buy order.
    :return:
    '''
    print('entering position')
    print(f'entry_amount: {amount}')
    print(f'rate: {rate}')
    print(f'ticker: {pair}')

    if LOGICAL_PARAMS["DRY_RUN"] is False:
        response = poloniex_wrapper.trade(
            currency_pair=pair,
            rate=rate,
            amount=amount,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…