-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathendpoints.go
41 lines (39 loc) · 1.24 KB
/
endpoints.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package client
// user_endpoint is the endpoint for the user info API call.
var user_endpoint = "https://api.marketdata.app/user/"
// endpoints maps API calls to their corresponding endpoints.
var endpoints = map[int]map[string]map[string]string{
1: {
"markets": {
"status": "/v1/markets/status/",
},
"stocks": {
"candles": "/v1/stocks/candles/{resolution}/{symbol}/",
"bulkcandles": "/v1/stocks/bulkcandles/{resolution}/",
"quotes": "/v1/stocks/quotes/{symbol}/",
"bulkquotes": "/v1/stocks/bulkquotes/",
"earnings": "/v1/stocks/earnings/{symbol}/",
"news": "/v1/stocks/news/{symbol}/",
},
"options": {
"expirations": "/v1/options/expirations/{symbol}/",
"lookup": "/v1/options/lookup/{userInput}",
"strikes": "/v1/options/strikes/{symbol}/",
"quotes": "/v1/options/quotes/{symbol}/",
"chain": "/v1/options/chain/{symbol}/",
},
"indices": {
"quotes": "/v1/indices/quotes/{symbol}/",
"candles": "/v1/indices/candles/{resolution}/{symbol}/",
},
"funds": {
"candles": "/v1/funds/candles/{resolution}/{symbol}/",
},
},
2: {
"stocks": {
"tickers": "/v2/stocks/tickers/{datekey}/",
"candles": "/v2/stocks/candles/{resolution}/{symbol}/{datekey}",
},
},
}