Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bitgetlimited
GitHub Repository: bitgetlimited/v3-bitget-api-sdk
Path: blob/master/bitget-node-sdk-api/src/lib/v1/SpotMarketApi.ts
518 views
1
import {BaseApi} from '../BaseApi';
2
3
export class SpotMarketApi extends BaseApi {
4
currencies() {
5
const url = '/api/spot/v1/public/currencies';
6
const headers = this.signer('GET', url, null)
7
return this.axiosInstance.get(url, {headers})
8
}
9
10
products() {
11
const url = '/api/spot/v1/public/products';
12
const headers = this.signer('GET', url, null)
13
return this.axiosInstance.get(url, {headers})
14
}
15
16
product(qsOrBody: object) {
17
const url = '/api/spot/v1/public/product';
18
const headers = this.signer('GET', url, qsOrBody)
19
return this.axiosInstance.get(url, {headers, params: qsOrBody})
20
}
21
22
fills(qsOrBody: object) {
23
const url = '/api/spot/v1/market/fills';
24
const headers = this.signer('GET', url, qsOrBody)
25
return this.axiosInstance.get(url, {headers, params: qsOrBody})
26
}
27
28
depth(qsOrBody: object) {
29
const url = '/api/spot/v1/market/depth';
30
const headers = this.signer('GET', url, qsOrBody)
31
return this.axiosInstance.get(url, {headers, params: qsOrBody})
32
}
33
34
ticker(qsOrBody: object) {
35
const url = '/api/spot/v1/market/ticker';
36
const headers = this.signer('GET', url, qsOrBody)
37
return this.axiosInstance.get(url, {headers, params: qsOrBody})
38
}
39
40
tickers() {
41
const url = '/api/spot/v1/market/tickers';
42
const headers = this.signer('GET', url, null)
43
return this.axiosInstance.get(url, {headers})
44
}
45
46
candles(qsOrBody: object) {
47
const url = '/api/spot/v1/market/candles';
48
const headers = this.signer('GET', url, qsOrBody)
49
return this.axiosInstance.get(url, {headers, params: qsOrBody})
50
}
51
}
52