Options

Problem with API and buy Accumulators

Hi

I am trying to sent via api a buy request for accumulators, everything is fine with it except I can't send the 'Take profit' parameter, how can I do this?

My current request is:

# Buy
compra = {
'buy': 1,
'subscribe': 1,
'price': 100000,
'parameters': {
'amount': monto,
'basis': 'stake',
'currency': 'USD',
'symbol': simbolo,
'contract_type': 'ACCU',
'growth_rate': 0.01,
'take_profit': 1, # HERE FAILS
}
}

response = await api.buy(compra)

Any suggestion?

Thank you

Comments

  • Options

    The solution is:

    # Buy
    compra = {
    'buy': 1,
    'subscribe': 1,
    'price': 100000,
    'parameters': {
    'amount': monto,
    'basis': 'stake',
    'currency': 'USD',
    'symbol': simbolo,
    'contract_type': 'ACCU',
    'growth_rate': g_rate,
    "limit_order": {
    "take_profit": ganancia
    }

    }
    }

Sign In or Register to comment.