List price of stocks??

Added by kalle 3 months ago

This is how I get orders
String resp = baseResource.path("accounts").path(String.valueOf(accno)).path("orders").request(responseType).get(String.class);

and this how I post an order
String cmd = "{\"identifier\": \"101\", \"market_id\": 11, \"price\": 81, \"volume\": 200, \"currency\": \"SEK\", \"side\": \"BUY\", \"order_type\": \"FAK\"}\n";
Response order = baseResource.path("accounts").path(String.valueOf(accno)).path("orders").request(responseType).post(Entity.json(cmd));

My question is, how do I get the price of a stock?
I want to get the current price every time I request the price of a current stock.

I have tried this command:
String cmd = "{\"cmd\": \"subscribe\", \"args\": {\"t\": \"price\", \"m\": 11, \"i\": \"101\"}}\n";
Response resp = baseResource.request(responseType).post(Entity.json(cmd));

I got this response:
InboundJaxrsResponse{ClientResponse{method=POST, uri=, status=405, reason=Method Not Allowed}}

Replies (1)

RE: List price of stocks?? - Added by kalle 3 months ago


I have read about:
Chart data
Chart data gives price data for an instrument for today. The information is for each minute during the day.

and also:
Graph data request is not available.

The question still remains, "how do I get the price of a stock?" if I cannot test with price from a stock, how am I suppose to know if it works with real data?