WebApi

<back to all web services

CreateOrder

Create new exchange order

The following routes are available for this service:
POST, OPTIONS/Orders/New
CreateOrder Parameters:
NameParameterData TypeRequiredDescription
AuthorizationheaderstringYesAuthorization token in the form "Bearer your_token_here"
ExchangebodystringYes
CurrencyPairbodystringYes
TypebodystringYes
SidebodystringYes
QuantitybodystringYes
PricebodystringNo
ClientIdbodystringNo
SessionIdbodystringNo
SessionSubIdbodystringNo
Order Parameters:
NameParameterData TypeRequiredDescription
ClientIdformstringNo
OrderIdformstringNo
TimestampformDateTimeNo
InstformInstrumentNo
ExchangeformExchangeNameNo
CurrencyPairformCurrencyPairNo
TypeformOrderTypeNo
SideformOrderSideNo
StatusformOrderStatusNo
PriceformdecimalNo
QuantityformdecimalNo
RemainingformdecimalNo
FilledformdecimalNo
SessionIdformstringNo
SessionSubIdformstringNo
LastTradeTimestampformDateTime?No
FillsformList<MarketDepthItem>No
CostformdecimalNo
Instrument Parameters:
NameParameterData TypeRequiredDescription
SymbolformCurrencyPairNo
ExchangeformExchangeNameNo
CurrencyPair Parameters:
NameParameterData TypeRequiredDescription
BaseformCurrencyNo
QuoteformCurrencyNo
NameformstringNo
Currency Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
MarketDepthItem Parameters:
NameParameterData TypeRequiredDescription
PriceformdecimalNo
QuantityformdecimalNo
TimestampformDateTimeNo
SideformOrderSideNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Orders/New HTTP/1.1 
Host: burntrouter.info 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CreateOrder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Algomate.API.ServiceModel">
  <Authorization>String</Authorization>
  <ClientId>String</ClientId>
  <CurrencyPair>String</CurrencyPair>
  <Exchange>String</Exchange>
  <Price>String</Price>
  <Quantity>String</Quantity>
  <SessionId>String</SessionId>
  <SessionSubId>String</SessionSubId>
  <Side>String</Side>
  <Type>String</Type>
</CreateOrder>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<Order xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Algomate.Scripting">
  <SessionId>String</SessionId>
  <SessionSubId>String</SessionSubId>
</Order>