Jump to content

SirNewton

Members
  • Content count

    31
  • Joined

  • Last visited

  • Days Won

    1

SirNewton last won the day on January 25

SirNewton had the most liked content!

About SirNewton

  • Rank
    Advanced Member
  1. I ran it a few more times, looks like it randomly omits date "2021-04-09 00:00:00" on any pairs. Sometimes is shows up and sometimes it doesn't. Looks like this issue started the passed week or so. Pretty recent issue.
  2. Hello @Physicsman I am facing an issue with the Historical Data. No data coming in for date "2021-04-09 00:00:00" either ASK, BID or MID on EUR/USD and EUR/GBP No data coming in for date "2021-04-09 00:00:00" either ASK or MID on USD/JPY EUR/USD BID{"BarDate": "2021-04-08 00:00:00", "Open": 1.1865, "High": 1.19264, "Low": 1.18596, "Close": 1.19125}, {"BarDate": "2021-04-12 00:00:00", "Open": 1.18898, "High": 1.19032, "Low": 1.18877, "Close": 1.18906} EUR/GBP BID{"BarDate": "2021-04-08 00:00:00", "Open": 0.86389, "High": 0.86804, "Low": 0.86208, "Close": 0.86728}, {"BarDate": "2021-04-12 00:00:00", "Open": 0.86669, "High": 0.86823, "Low": 0.86656, "Close": 0.86811} USD/JPY ASK{"BarDate": "2021-04-08 00:00:00", "Open": 109.873, "High": 109.914, "Low": 109.008, "Close": 109.285}, {"BarDate": "2021-04-12 00:00:00", "Open": 109.85, "High": 109.85, "Low": 109.653, "Close": 109.733} Was the market for those Pairs closed on Friday? If not, are there any issues with the generation of Historical Data? The historical data I am collecting has a Span of 1 (i.e. daily). I tried pulling several times and I am seeing same issue each time. Thanks.
  3. Hi @SupereeDuperee, the Time Range, I collect for Historical Data is Daily. The funny thing is, along with Ask, I also collect Bid and Mid, and neither for the same Pair had this issue.
  4. Hello PM, I am seeing Historical Data coming in out of bound. I noticed this because, I have set check constraint and because of Low being zero, my app crashed on the check. There might be others, but so far I have found this one. Please investigate why this is happened. ASK USD/CAD: {"BarDate": "2021-03-22 00:00:00", "Open": 1.25296, "High": 1.25426, "Low": 0.0, "Close": 1.25249} Thank you, SN
  5. "According to the Pricing team, an erroneous price tick was sent after market close on Friday resulting in the Saturday price bar" By the way, if those price ticks are actual and not generated by error. I rather you keep it in the history. I can write code to combine those with Friday historical.
  6. Thank you. I looked through the full history and found similar out of bound entries. Will provide sqlscript used to find out of bound entries. Note: I use Postgres, but you should be able to do similar queries in other databases. In the DB datetime is "BarDate". Will give you Saturday and Sunday select * forex_history where extract(isodow from datetime)in(0,6,7) Or to see just Saturday select * forex_history where extract(isodow from datetime)=6
  7. Hello @Physicsman While processing Historical data, I saw something unusual that I need your help with. We know that the Steaming Data along with the market closes on FRIDAY 9:59PM GMT And, we know that the Steaming Data along with the market opens on SUNDAY 10:00PM GMT And, we know that Each "day" historical data covers from midnight (00:00) to 23:59 GMT But, I noticed that in the Historical Data that was outside that range. See Blow: AUD/JPY: ASK: {"BarDate": "2021-02-20 00:00:00", "Open": 83.062, "High": 83.062, "Low": 83.062, "Close": 83.062} BID: {"BarDate": "2021-02-20 00:00:00", "Open": 82.912, "High": 82.912, "Low": 82.912, "Close": 82.912} USD/CHF: ASK: {"BarDate": "2021-02-20 00:00:00", "Open": 0.89672, "High": 0.89672, "Low": 0.89672, "Close": 0.89672} BID: {"BarDate": "2021-02-20 00:00:00", "Open": 0.89607, "High": 0.89607, "Low": 0.89607, "Close": 0.89607} USD/JPY: ASK: {"BarDate": "2021-02-20 00:00:00", "Open": 105.514, "High": 105.514, "Low": 105.514, "Close": 105.514} BID: {"BarDate": "2021-02-20 00:00:00", "Open": 105.392, "High": 105.392, "Low": 105.392, "Close": 105.392} 2021-02-20 is a Saturday. The other pairs, I am processing had a BarDate of "2021-02-19 00:00:00", which is what I expected. Can you please explain the discrepancy of the BarDate of pairs AUD/JPY, USD/CHF, and USD/JPY? Thank you.
  8. @SupereeDuperee I get that,. I was just not expecting that amount of a spread change within a second.
  9. Closing trade

    Got it. Even though, I would rather control the order I close the trades myself, I have adjusted for FIFO. Thanks.
  10. Closing trade

    Why enforce FIFO in the US? Not sure, why that would be the case. Why would the US regulators enforce that?
  11. Closing trade

    Are you a US client? Yes, I am in the US. And I am a US client. Did you have more than one open position in the same market, and you were attempting to close one of those open positions specifically? Yes, I had several open in the same market and was trying to close one specifically. When I don't include anything in the CLOSE, it seems to close a random trade. I was hoping to use CLOSE to close a specific trade. Thank you.
  12. Hello Physicsman, have a question using Close key value pair to close an existing trade. See: https://docs.labs.gaincapital.com/#Data Types/NewTradeOrderRequestDTO.htm Close integer[] List of existing open trade order IDs that require part or full closure. I tied it out on Postman with below JSON object: { "MarketId": 401484406, "Currency": null, "AutoRollover": false, "Direction": "sell", "Quantity": 1000, "QuoteId": 0, "PositionMethodId": 0, "BidPrice": 1.0001, "OfferPrice": 1.5001, "AuditId": "939239####", "TradingAccountId": ##########, "IfDone": null, "Close": ["779386607"], "Reference": null, "AllocationProfileId": 0, "OrderReference": null, "Source": null, "PriceTolerance": 0, "isTrade":true } And the response I get: { "Status": 4, "StatusReason": 112, "OrderId": 0, "Orders": [], "Quote": null, "Actions": [], "ErrorMessage": null } I looked up 112 StatusReason and according the documentation: https://docs.labs.gaincapital.com/#APICodesList.htm?Highlight=API Code Lookup Values I see it say, "NFA FIFO Account - Target closure restricted." What am I doing wrong here? How do I use Close with API NewTradeOrderRequest to close an existing trade? Thank you.
  13. Real-time streaming and trading

    Thanks for your reply Physicsman. Have adjusted program.
  14. Streaming data seems off around closing. Any issues with the streaming of CAD/JPY today? Below, you can see the steaming data processed and sent to my Kafka servers. The datetime is in CST. As you can see timeframe between 021-02-12 15:59:57.814888 and 2021-02-12 15:59:58.064755 seems unusual. The BID went from 82.592 to 82.527 and the ASK went from 82.708 to 82.767. Difference from BID to ASK went from 82.708 - 82.592 = .116 to 82.767 - 82.527 = .24 that changed more than double. Is this correct? {'symbol': 'CADJPY', 'bid': '82.601', 'ask': '82.713', 'price': '82.657', 'DATETIME': '2021-02-12 15:59:56.738579'} {'symbol': 'CADJPY', 'bid': '82.599', 'ask': '82.714', 'price': '82.657', 'DATETIME': '2021-02-12 15:59:57.093342'} {'symbol': 'CADJPY', 'bid': '82.599', 'ask': '82.715', 'price': '82.657', 'DATETIME': '2021-02-12 15:59:57.321731'} {'symbol': 'CADJPY', 'bid': '82.598', 'ask': '82.714', 'price': '82.656', 'DATETIME': '2021-02-12 15:59:57.599380'} {'symbol': 'CADJPY', 'bid': '82.592', 'ask': '82.708', 'price': '82.650', 'DATETIME': '2021-02-12 15:59:57.814888'} {'symbol': 'CADJPY', 'bid': '82.527', 'ask': '82.767', 'price': '82.647', 'DATETIME': '2021-02-12 15:59:58.064755'} {'symbol': 'CADJPY', 'bid': '82.535', 'ask': '82.775', 'price': '82.655', 'DATETIME': '2021-02-12 15:59:58.844187'} {'symbol': 'CADJPY', 'bid': '82.533', 'ask': '82.773', 'price': '82.653', 'DATETIME': '2021-02-12 15:59:59.139130'} {'symbol': 'CADJPY', 'bid': '82.534', 'ask': '82.774', 'price': '82.654', 'DATETIME': '2021-02-12 15:59:59.347454'} {'symbol': 'CADJPY', 'bid': '82.527', 'ask': '82.767', 'price': '82.647', 'DATETIME': '2021-02-12 15:59:59.595988'} {'symbol': 'CADJPY', 'bid': '82.535', 'ask': '82.775', 'price': '82.655', 'DATETIME': '2021-02-12 15:59:59.855962'} {'symbol': 'CADJPY', 'bid': '82.535', 'ask': '82.775', 'price': '82.655', 'DATETIME': '2021-02-12 16:00:00.111481'}
  15. Real-time streaming and trading

    Another question on streaming. We have Bid, Offer, and Price in the streaming. I read Price was the price of the last trade. Is that for both Bid trades and Offer trades? Because depending on the direction, there is a price difference.
×