dimanche 20 juillet 2014

Setting the leverage/margin through API

Hi,



So I've managed to successfully open trades through API. However, I don't see how it is possible to use leverage / trade on margin (I'd like to set something like 20:1).



How can I enable it? Is it done through valuemap (but then I don't see the right enum to do this)? Right now I prepare for the trade this way:

...

valuemap->setString(OfferID, watched_pairs[offer].offer_id);

valuemap->setString(BuySell, trade_type);

valuemap->setInt(Amount, BASE_AMOUNT);

valuemap->setString(O2GRequestParamsEnum::PegTypeLimit, "O");

valuemap->setString(O2GRequestParamsEnum::PegTypeStop, "O");

valuemap->setInt(O2GRequestParamsEnum::PegOffsetStop, stop_loss);

valuemap->setInt(O2GRequestParamsEnum::PegOffsetLimit, take_profit);

...

Are there any parameters that I have to set? Is it even possible?



Thanks.




Aucun commentaire:

Enregistrer un commentaire