Jump to content
  • 0

Java API: getPricesByDateRange


tetramorium

Question

I can connect via the rest API and successfully execute various calls such as

  restApi.getWatchlistsV1(authenticationContext.getConversationContext());

which return successfully (so I know that i have successfully authenticated). However the following fails with 400 Bad Request:

  restApi.getPricesByDateRangeV2(authenticationContext.getConversationContext(), "2021-01-21", "IX.D.FTSE.CFD.IP", "DAY", "2021-01-19");

...note these parameters do return data if I check using the API Companion, so any suggestions appreciated.

Many thanks.

Link to post

1 answer to this question

Recommended Posts

  • 0

FWIW the V3 call works. So I don't know whether I was using V2 incorrectly, or it's just not supported.

For reference here's a working example:

restApi.getPricesV3(authenticationContext.getConversationContext(), "1", "4", "200", "IX.D.FTSE.CFD.IP", "2021-01-19", "2021-01-21", "DAY");

Link to post

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • General Statistics

    • Total Topics
      14,244
    • Total Posts
      70,595
    • Total Members
      59,176
    • Most Online
      5,137
      14/01/21 09:51

    Newest Member
    Viswa
    Joined 24/02/21 23:26
  • Posts

    • I'm trying to work out the Return on Assets on some banks which is Income/Assets but I don't know which figure on the accounts to use.  I'm using Stockopedia. Do I use the Net Income listed part way down the Income statement or the one right up top of the Cash Flow Statement? Any help would be greatly appreciated.
    • It's not being terrified of losing. I get that you need to lose sometimes to win but in the end of the day your account/expectancy needs to be positive, so I guess it's the fear of repeated losses or the one big loss that you then need to recover from, 2 steps forward 3 steps back. That's of course if you're willing to put yourself in a big loss situation i.e. too big a position size.
    • Sorry captainsamurai, are you actually saying that you won't go bankrupt? In my case no I'd stop trading before that happened but I could sure make a nice dent in my savings first.
×
×
  • Create New...