What is FIX API? Why is FIX API helpful?
FIX API. FIX is the so-called Financial Information eXchange (FIX) protocol. It is a message-based standard for the …
This is a function to send a message to place an order.
Usually, when a message describing the execution report arrives, the ExecutionReport callback will be triggered.
To simplify the process, we send market orders only and each order’s TimeInForce is set to FILL_OR_KILL.
The message type (MsgType, Tag ID: 35) is “D”. Actually, this tag field is encapsulated, only useful when you check the log file.
Usually, we will get these tag fields from the message:
This ID should be generated on our side(the client side). It will be returned when the execution report arrives.
order.set(new ClOrdID(clOrderId));
To simplify the process, we set OrdType to MARKET.
order.set(new OrdType(OrdType.MARKET));
order.set(new Symbol(symbolName));
To simplify the process, this variable describes that the order side is either Buy or Sell.
if ("BUY".equals(orderType)) {
order.set(new Side(Side.BUY));
} else {
order.set(new Side(Side.SELL));
}
This variable describes the quantity of the specific order(order volume).
double orderQty = lots * 100000;
order.set(new OrderQty(orderQty));
To simplify the process, we only send market orders. So, TimeInForce usually is set to FILL_OR_KILL.
order.set(new TimeInForce(TimeInForce.FILL_OR_KILL));
order.set(new TransactTime());
mdr.setString(Account.FIELD, accountId);
The received messages will output to the “orderlog” folder.
If you want to parse them, please use Fintechee Online FIX Parser.
If you want to trade via FIX API, please use Fintechee FIX API Trading Platform Individual Version(Paid Version).
If you have a Github / Youtube account, you can get a free license for the paid version(No Charge)!
If you have no Github / Youtube account, you can still use Fintechee FIX API Trading Platform Bridge Version(Free Forever)!
If you are working for financial institutions, you can choose Fintechee FIX API Trading Platform Institution Version(White Label License).
Please access our Github repository to get the latest source codes.
public void sendMarketOrder(String clOrderId, String symbolName, double lots, String orderType, double price) {
try {
NewOrderSingle order = new NewOrderSingle();
order.set(new ClOrdID(clOrderId));
order.set(new OrdType(OrdType.MARKET));
order.set(new Symbol(symbolName));
if ("BUY".equals(orderType)) {
order.set(new Side(Side.BUY));
} else {
order.set(new Side(Side.SELL));
}
double orderQty = lots * 100000;
order.set(new OrderQty(orderQty));
order.set(new TimeInForce(TimeInForce.FILL_OR_KILL));
order.set(new TransactTime());
order.setString(Account.FIELD, accountId);
send(order);
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getMessage());
}
}
FIX API. FIX is the so-called Financial Information eXchange (FIX) protocol. It is a message-based standard for the …
This is the FIX API Starter Application Class. It includes: A method to be called to start FIX API Data session A method …
We offer professional FIX API consulting services, including self-service options for establishing a broker business. There are no additional fees, and all resources can be utilized without any associated costs.
Book One