Jump to content

timothy

Members
  • Content count

    56
  • Joined

  • Last visited

Posts posted by timothy


  1. thanks for the heads up.

    we have implemented integration tests to verify the integrity of the schema/smd but yes, you should report any issues but github issues for CIAPI.CS is a more appropriate location unless the issue requires discussion. (stricken text requires some discussion, for the time being report here)

    An update to the documentation for a number of DTOs and methods is on it’s way.


  2. If you’re working with the API directly then post a NewStopLimitOrderRequestDTO to order/newstoplimitorder. The Direction field will define whether it’s a stop or a limit order, and you can set up an OCO by including a NewStopLimitOrderRequestDTO in the OCO field. If dones (if/then) are setup by including an array of GatewayIfDoneDTOs in the IfDone field.

    The names of some of these data types are subject to change, so check the documentation.

    @yarane The documentation has been updated and the trading api calls are included.


  3. After posted 

    {“OrderId”:0,“MarketId”:400481111,“Currency”:“CAD”,“AutoRollover”:true,“Direction”:“buy”,“Quantity”:100,“BidPrice”:1.02199,“OfferPrice”:1.02241,“AuditId”:“20110421-G2PREPROD3-0404602”,“TradingAccountId”:200009371,“IfDone”:null,“OcoOrder”:null,“Applicability”:“GTC”,“ExpiryDateTimeUTC”:null,“Guaranteed”:true,“TriggerPrice”:100}

    I got

    ‘{“OrderId”:0,“Orders”:[{“CommissionCharge”:0,“GuaranteedPremium”:0,“IfDone”:null,“OCO”:null,“OrderId”:0,“Price”:0,“Status”:10,“StatusReason”:8}],“Quote”:null,“Status”:2,“StatusReason”:75}’

    What does it mean? User 0x234

    The StatusReason on the order shows it’s below the minimum quantity for that market.


  4. Yes, and StatusReason=15 means “Market does not allow Stop orders”. My question was – is there a market which allows stops and limits? Also, how do I know if a market allows or not stops and limits? Before let user try to place them.


  5. Hi,

    After attempting to place a trade with stop/limit I got status code 15, which means “Market does not allow Stop orders”. Question one: where can I get a market which allows them? Two: does that affect limit orders too?

    Market information for the market says:

           "LimitDown" : false,

            "LimitUp" : false,

    does that mean I can’t place limit orders on the market? All my markets (user XX381270) have these settings.

    Which market did you get the error message for? Additionally, can you let me know what the response from your API call was.


  6. Consider

    GetPriceBars(string marketId, string interval, int span, string priceBars)

    The demo value for interval is MINUTES.

    Where would one find a complete explanation of the acceptable values for this parameter?

    We run into the same issue in various request and response DTO, both as strings and as numbers (typically in Status related fields).

    These types of fields, in a perfect world, would be implemented as Enum, which would serve to strongly type the value ergo pre-validation, as well as providing a self documenting API.

    I realize that a change like this may not happen any time soon, if at all, but it is something to consider.

    But back to the question at hand – We do need a full list of these ‘magic’ parameter and property values. Where can we find this and how will the API team ensure that this information is kept up-to-date?

    The “magic numbers”, or Ids that we use for localisation can change (get added to, or text rewritten etc). This is why it might not be a good idea to have a static enumeration, because it could get out of date. The recommended way is to call the GetMessageLookup API and get the text in the appropriate language for the user. If it’s for helping to write the client application code, then why not create a static enum in the client library for the Ids you use frequently?


  7. If you don’t provide the currency in the trade/order request then the trade is placed in the currency of the market. If you do provide the currency and it doesn’t match the market’s currency you’ll receive this error. I would suggest leaving the currency out of the request. If you want to place a trade in the other currency (for a given currency pair market), then find the market which has the other currency specified as it’s base and use that market.

    Using a different trade currency makes more sense if you’re using markets such as equities and commodities etc.


  8. It’s impossible to answer without some context. For example:

    Given that the Java API will be used heavily on an Android or GAE platform, and those platforms limit a person’s ability to handle multiple threads, I will focus on the development of a Synchronous version first. On both of those platforms, you are unable to create new threads. This means that all of my API calls must block.


  9. If you’re working with the API directly then post a NewStopLimitOrderRequestDTO to order/newstoplimitorder. The Direction field will define whether it’s a stop or a limit order, and you can set up an OCO by including a NewStopLimitOrderRequestDTO in the OCO field. If dones (if/then) are setup by including an array of GatewayIfDoneDTOs in the IfDone field.

    The names of some of these data types are subject to change, so check the documentation.


  10. If you mean communication of events such as an order triggering, then you can subscribe to streaming orders to pickup a notification.

    The following scenarios are made up of 6 orders to illustrate all possible scenarios. The primary opening orders are a stop #1 and limit #2 linked to each other in an OCO relationship. Each of these orders has a pair of linked stop and limit orders (#3-4 are tied to #1 and #5-6 are tied to #2. It is assumed that the trading account has no open positions in the market.

    Client places orders Stop # 1 moves to state Accepted. Limit #2 moves to state Accepted.
    Stop #3 moves to state Pending. Limit #4 moves to state Pending. Stop #5 moves to state Pending. Limit #6 moves to state Pending. Limit #2 is triggered

    Stop #1 moves to state Suspended. Limit #2 moves to state Triggered. Stop #3 remains at state Pending. Limit #4 remains at state Pending. Stop #5 remains at state Pending. Limit #6 remains at state Pending.

    Limit #2 is filled successfully Stop #1 moves to state Cancelled. Limit #2 moves to state Open. Stop #3 moves to state Cancelled. Limit #4 moves to state Cancelled. Stop #5 moves to state Accepted. Limit #6 moves to state Accepted.

    Limit #2 is filled but results in a yellow card Stop #1 remains at state Suspended. Limit #2 moves to state Yellow Card. Stop #3 remains at state Pending. Limit #4 remains at state Pending. Stop #5 remains at state Pending. Limit #6 remains at state Pending.

    Limit #2 is accepted Stop #1 moves to state Cancelled. Limit #2 moves to state Open. Stop #3 moves to state Cancelled. Limit #4 moves to state Cancelled. Stop #5 moves to state Accepted.
    Limit #6 moves to state Accepted.

    Limit #2 is rejected Stop #1 moves to state Cancelled. Limit #2 moves to state Rejected. Stop #3 moves to state Cancelled. Limit #4 moves to state Cancelled. Stop #5 moves to state Cancelled. Limit #6 moves to state Cancelled.

    Limit #2 has filled successfully and now Limit #6 triggers. Limit #2 remains at state Open. Stop #5 moves to state Suspended. Limit #6 moves to state Triggered.

    Limit #6 fills successfully and fully closes Limit #2 Limit #2 moves to state Closed. Stop #5 moves to state Cancelled. Limit #6 moves to state Closed.

×