FTX | Place Orders

In order to place new orders in FTX, you require first your APIs to access your private data, check the following article How Use Private REST API.

 

Once you have configured your API keys, you can start to place orders

Market Order

Place a new Market Order, buy 0.002 contracts of BTC-PERP


oFTX := TsgcWSAPI_FTX.Create(nil);
oFTX.FTX.ApiKey := 'your api key';
oFTX.FTX.ApiSecret := 'your api secret';
ShowMessage(oFTX.REST_API.PlaceMarketOrder('BTC-PERP', ftosBuy, 0.002));

Limit Order

Place a new Limit Order, buy 0.002 contracts of BTC-PERP at price limit of 10000


oFTX := TsgcWSAPI_FTX.Create(nil);
oFTX.FTX.ApiKey := 'your api key';
oFTX.FTX.ApiSecret := 'your api secret';
ShowMessage(oFTX.REST_API.PlaceLimitOrder('BTC-PERP', ftosBuy, 0.002, 10000));