@grvt/client 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
# GRVT
|
|
2
|
-
|
|
3
|
-
Node.js & JavaScript client for GRVT REST APIs & WebSockets
|
|
4
|
-
|
|
5
|
-
## Installing
|
|
6
|
-
|
|
7
|
-
Using npm:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @grvt/client
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Using yarn:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
yarn add @grvt/client
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Using pnpm:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
pnpm add @grvt/client
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Once the package is installed, you can import the library using `import` or `require` approach:
|
|
26
|
-
|
|
27
|
-
```js
|
|
28
|
-
import GRVT from '@grvt/client'
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
You can also use the default export, since the named export is just a re-export from the GRVT factory:
|
|
32
|
-
|
|
33
|
-
```js
|
|
34
|
-
import GRVT from '@grvt/client'
|
|
35
|
-
console.log(
|
|
36
|
-
new GRVT.MDG({
|
|
37
|
-
host: 'https://market-data.dev.gravitymarkets.io',
|
|
38
|
-
version: 'v1'
|
|
39
|
-
})
|
|
40
|
-
)
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
If you use `require` for importing:
|
|
44
|
-
|
|
45
|
-
```js
|
|
46
|
-
const GRVT = require('@grvt/client')
|
|
47
|
-
console.log(
|
|
48
|
-
new GRVT.MDG({
|
|
49
|
-
host: 'https://market-data.dev.gravitymarkets.io',
|
|
50
|
-
version: 'v1'
|
|
51
|
-
})
|
|
52
|
-
)
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## To use WebSocket (available only in browsers that support WebSocket)
|
|
56
|
-
|
|
57
|
-
[Browsers supported](https://caniuse.com/websockets)
|
|
58
|
-
|
|
59
|
-
```js
|
|
60
|
-
import { EStreamEndpoints, WS } from '@grvt/client/ws'
|
|
61
|
-
console.log(new WS('wss://market-data.dev.gravitymarkets.io/ws'))
|
|
62
|
-
```
|
|
1
|
+
# GRVT
|
|
2
|
+
|
|
3
|
+
Node.js & JavaScript client for GRVT REST APIs & WebSockets
|
|
4
|
+
|
|
5
|
+
## Installing
|
|
6
|
+
|
|
7
|
+
Using npm:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @grvt/client
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Using yarn:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn add @grvt/client
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Using pnpm:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm add @grvt/client
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Once the package is installed, you can import the library using `import` or `require` approach:
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import GRVT from '@grvt/client'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
You can also use the default export, since the named export is just a re-export from the GRVT factory:
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
import GRVT from '@grvt/client'
|
|
35
|
+
console.log(
|
|
36
|
+
new GRVT.MDG({
|
|
37
|
+
host: 'https://market-data.dev.gravitymarkets.io',
|
|
38
|
+
version: 'v1'
|
|
39
|
+
})
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If you use `require` for importing:
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
const GRVT = require('@grvt/client')
|
|
47
|
+
console.log(
|
|
48
|
+
new GRVT.MDG({
|
|
49
|
+
host: 'https://market-data.dev.gravitymarkets.io',
|
|
50
|
+
version: 'v1'
|
|
51
|
+
})
|
|
52
|
+
)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## To use WebSocket (available only in browsers that support WebSocket)
|
|
56
|
+
|
|
57
|
+
[Browsers supported](https://caniuse.com/websockets)
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
import { EStreamEndpoints, WS } from '@grvt/client/ws'
|
|
61
|
+
console.log(new WS('wss://market-data.dev.gravitymarkets.io/ws'))
|
|
62
|
+
```
|
|
@@ -181,7 +181,9 @@ export declare enum ETimeInterval {
|
|
|
181
181
|
export declare enum ETransferType {
|
|
182
182
|
STANDARD = "STANDARD",
|
|
183
183
|
FAST_ARB_DEPOSIT = "FAST_ARB_DEPOSIT",
|
|
184
|
-
FAST_ARB_WITHDRAWAL = "FAST_ARB_WITHDRAWAL"
|
|
184
|
+
FAST_ARB_WITHDRAWAL = "FAST_ARB_WITHDRAWAL",
|
|
185
|
+
NON_NATIVE_BRIDGE_DEPOSIT = "NON_NATIVE_BRIDGE_DEPOSIT",
|
|
186
|
+
NON_NATIVE_BRIDGE_WITHDRAWAL = "NON_NATIVE_BRIDGE_WITHDRAWAL"
|
|
185
187
|
}
|
|
186
188
|
export declare enum ETriggerBy {
|
|
187
189
|
UNSPECIFIED = "UNSPECIFIED",
|
|
@@ -357,6 +357,10 @@ var ETransferType;
|
|
|
357
357
|
ETransferType["FAST_ARB_DEPOSIT"] = "FAST_ARB_DEPOSIT";
|
|
358
358
|
// Fast Arb Withdrawal Metadata type
|
|
359
359
|
ETransferType["FAST_ARB_WITHDRAWAL"] = "FAST_ARB_WITHDRAWAL";
|
|
360
|
+
// Transfer type for non native bridging deposit
|
|
361
|
+
ETransferType["NON_NATIVE_BRIDGE_DEPOSIT"] = "NON_NATIVE_BRIDGE_DEPOSIT";
|
|
362
|
+
// Transfer type for non native bridging withdrawal
|
|
363
|
+
ETransferType["NON_NATIVE_BRIDGE_WITHDRAWAL"] = "NON_NATIVE_BRIDGE_WITHDRAWAL";
|
|
360
364
|
})(ETransferType || (exports.ETransferType = ETransferType = {}));
|
|
361
365
|
// Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.
|
|
362
366
|
//
|
|
@@ -185,7 +185,9 @@ exports.ETimeIntervalInt = Object.freeze({
|
|
|
185
185
|
exports.ETransferTypeInt = Object.freeze({
|
|
186
186
|
[data_interface_1.ETransferType.STANDARD]: 1,
|
|
187
187
|
[data_interface_1.ETransferType.FAST_ARB_DEPOSIT]: 2,
|
|
188
|
-
[data_interface_1.ETransferType.FAST_ARB_WITHDRAWAL]: 3
|
|
188
|
+
[data_interface_1.ETransferType.FAST_ARB_WITHDRAWAL]: 3,
|
|
189
|
+
[data_interface_1.ETransferType.NON_NATIVE_BRIDGE_DEPOSIT]: 4,
|
|
190
|
+
[data_interface_1.ETransferType.NON_NATIVE_BRIDGE_WITHDRAWAL]: 5
|
|
189
191
|
});
|
|
190
192
|
exports.ETriggerByInt = Object.freeze({
|
|
191
193
|
[data_interface_1.ETriggerBy.UNSPECIFIED]: 0,
|
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@grvt/client",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "Node.js & JavaScript client for GRVT REST APIs & WebSockets",
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/gravity-technologies/grvt-js-client.git"
|
|
8
|
-
},
|
|
9
|
-
"keywords": [
|
|
10
|
-
"GRVT"
|
|
11
|
-
],
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/gravity-technologies/grvt-js-client/issues"
|
|
14
|
-
},
|
|
15
|
-
"homepage": "https://github.com/gravity-technologies/grvt-js-client#readme",
|
|
16
|
-
"author": "danh@grvt.io",
|
|
17
|
-
"license": "UNLICENSED",
|
|
18
|
-
"engines": {
|
|
19
|
-
"node": ">=20"
|
|
20
|
-
},
|
|
21
|
-
"main": "dist/index.js",
|
|
22
|
-
"types": "dist/index.d.ts",
|
|
23
|
-
"scripts": {
|
|
24
|
-
"start": "tsc --watch",
|
|
25
|
-
"prebuild": "rimraf dist",
|
|
26
|
-
"build": "tsc",
|
|
27
|
-
"postbuild": "cp package.json dist/ && cp README.md dist/ && cp LICENSE dist/",
|
|
28
|
-
"prerelease": "npm run build",
|
|
29
|
-
"release": "cd dist/ && npm publish --access public",
|
|
30
|
-
"link-local": "cp package.json dist/ && cd dist/ && npm link && cd ..",
|
|
31
|
-
"lint": "npx eslint \"src/**/*.{js,ts}\"",
|
|
32
|
-
"lint-fix": "npx eslint \"src/**/*.{js,ts}\" --fix",
|
|
33
|
-
"test": "nodemon dist/index.js"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"axios": "^1.8.2"
|
|
37
|
-
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
40
|
-
"eslint": "^8.56.0",
|
|
41
|
-
"eslint-config-standard-with-typescript": "^39.1.1",
|
|
42
|
-
"eslint-plugin-import": "^2.29.0",
|
|
43
|
-
"eslint-plugin-import-newlines": "^1.3.4",
|
|
44
|
-
"eslint-plugin-n": "^16.3.0",
|
|
45
|
-
"eslint-plugin-promise": "^6.1.1",
|
|
46
|
-
"nodemon": "^3.0.2",
|
|
47
|
-
"rimraf": "^5.0.5",
|
|
48
|
-
"typescript": "^5.2.2"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@grvt/client",
|
|
3
|
+
"version": "1.4.2",
|
|
4
|
+
"description": "Node.js & JavaScript client for GRVT REST APIs & WebSockets",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/gravity-technologies/grvt-js-client.git"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"GRVT"
|
|
11
|
+
],
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/gravity-technologies/grvt-js-client/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/gravity-technologies/grvt-js-client#readme",
|
|
16
|
+
"author": "danh@grvt.io",
|
|
17
|
+
"license": "UNLICENSED",
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=20"
|
|
20
|
+
},
|
|
21
|
+
"main": "dist/index.js",
|
|
22
|
+
"types": "dist/index.d.ts",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"start": "tsc --watch",
|
|
25
|
+
"prebuild": "rimraf dist",
|
|
26
|
+
"build": "tsc",
|
|
27
|
+
"postbuild": "cp package.json dist/ && cp README.md dist/ && cp LICENSE dist/",
|
|
28
|
+
"prerelease": "npm run build",
|
|
29
|
+
"release": "cd dist/ && npm publish --access public",
|
|
30
|
+
"link-local": "cp package.json dist/ && cd dist/ && npm link && cd ..",
|
|
31
|
+
"lint": "npx eslint \"src/**/*.{js,ts}\"",
|
|
32
|
+
"lint-fix": "npx eslint \"src/**/*.{js,ts}\" --fix",
|
|
33
|
+
"test": "nodemon dist/index.js"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"axios": "^1.8.2"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
40
|
+
"eslint": "^8.56.0",
|
|
41
|
+
"eslint-config-standard-with-typescript": "^39.1.1",
|
|
42
|
+
"eslint-plugin-import": "^2.29.0",
|
|
43
|
+
"eslint-plugin-import-newlines": "^1.3.4",
|
|
44
|
+
"eslint-plugin-n": "^16.3.0",
|
|
45
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
46
|
+
"nodemon": "^3.0.2",
|
|
47
|
+
"rimraf": "^5.0.5",
|
|
48
|
+
"typescript": "^5.2.2"
|
|
49
|
+
}
|
|
50
|
+
}
|