Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 2393dd0

Browse files
authored
Merge pull request #268 from sanjam-deriv/websocket-update
2 parents f3d1a96 + 705b512 commit 2393dd0

File tree

132 files changed

+10997
-13241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+10997
-13241
lines changed

config/v3/active_symbols/send.json

Lines changed: 59 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,62 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"title": "Active Symbols (request)",
4-
"description": "Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).",
5-
"type": "object",
6-
"auth_required": 0,
7-
"additionalProperties": false,
8-
"required": [
9-
"active_symbols"
10-
],
11-
"properties": {
12-
"active_symbols": {
13-
"description": "If you use `brief`, only a subset of fields will be returned.",
14-
"type": "string",
15-
"enum": [
16-
"brief",
17-
"full"
18-
]
19-
},
20-
"landing_company": {
21-
"description": "Deprecated - replaced by landing_company_short.",
22-
"type": "string",
23-
"enum": [
24-
"iom",
25-
"malta",
26-
"maltainvest",
27-
"svg",
28-
"virtual",
29-
"vanuatu",
30-
"champion",
31-
"champion-virtual"
32-
]
33-
},
34-
"landing_company_short": {
35-
"description": "[Optional] If you specify this field, only symbols available for trading by that landing company will be returned. If you are logged in, only symbols available for trading by your landing company will be returned regardless of what you specify in this field.",
36-
"type": "string",
37-
"enum": [
38-
"iom",
39-
"malta",
40-
"maltainvest",
41-
"svg",
42-
"virtual",
43-
"vanuatu",
44-
"champion",
45-
"champion-virtual"
46-
]
47-
},
48-
"product_type": {
49-
"description": "[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.",
50-
"type": "string",
51-
"enum": [
52-
"basic"
53-
]
54-
},
55-
"loginid": {
56-
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
57-
"type": "string",
58-
"pattern": "^[A-Za-z]+[0-9]+$"
59-
},
60-
"passthrough": {
61-
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
62-
"type": "object"
63-
},
64-
"req_id": {
65-
"description": "[Optional] Used to map request to response.",
66-
"type": "integer"
67-
}
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Active Symbols (request)",
4+
"description": "Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).",
5+
"type": "object",
6+
"auth_required": 0,
7+
"additionalProperties": false,
8+
"required": ["active_symbols"],
9+
"properties": {
10+
"active_symbols": {
11+
"description": "If you use `brief`, only a subset of fields will be returned.",
12+
"type": "string",
13+
"enum": ["brief", "full"]
14+
},
15+
"landing_company": {
16+
"description": "Deprecated - replaced by landing_company_short.",
17+
"type": "string",
18+
"enum": [
19+
"iom",
20+
"malta",
21+
"maltainvest",
22+
"svg",
23+
"virtual",
24+
"vanuatu",
25+
"champion",
26+
"champion-virtual"
27+
]
28+
},
29+
"landing_company_short": {
30+
"description": "[Optional] If you specify this field, only symbols available for trading by that landing company will be returned. If you are logged in, only symbols available for trading by your landing company will be returned regardless of what you specify in this field.",
31+
"type": "string",
32+
"enum": [
33+
"iom",
34+
"malta",
35+
"maltainvest",
36+
"svg",
37+
"virtual",
38+
"vanuatu",
39+
"champion",
40+
"champion-virtual"
41+
]
42+
},
43+
"product_type": {
44+
"description": "[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.",
45+
"type": "string",
46+
"enum": ["basic"]
47+
},
48+
"loginid": {
49+
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
50+
"type": "string",
51+
"pattern": "^[A-Za-z]+[0-9]+$"
52+
},
53+
"passthrough": {
54+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
55+
"type": "object"
56+
},
57+
"req_id": {
58+
"description": "[Optional] Used to map request to response.",
59+
"type": "integer"
6860
}
61+
}
6962
}

config/v3/api_token/send.json

Lines changed: 52 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,55 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"title": "API Token (request)",
4-
"description": "This call manages API tokens",
5-
"type": "object",
6-
"auth_required": 1,
7-
"auth_scopes": [
8-
"admin"
9-
],
10-
"additionalProperties": false,
11-
"required": [
12-
"api_token"
13-
],
14-
"properties": {
15-
"api_token": {
16-
"description": "Must be `1`",
17-
"type": "integer",
18-
"enum": [
19-
1
20-
]
21-
},
22-
"delete_token": {
23-
"description": "[Optional] The token to remove.",
24-
"type": "string",
25-
"pattern": "^\\w+$"
26-
},
27-
"new_token": {
28-
"description": "[Optional] The name of the created token.",
29-
"type": "string",
30-
"pattern": "^[A-Za-z0-9\\s_]+$"
31-
},
32-
"new_token_scopes": {
33-
"description": "[Optional] List of permission scopes to provide with the token.",
34-
"type": "array",
35-
"items": {
36-
"description": "Required when create new token",
37-
"type": "string",
38-
"enum": [
39-
"read",
40-
"trade",
41-
"trading_information",
42-
"payments",
43-
"admin"
44-
]
45-
},
46-
"uniqueItems": true
47-
},
48-
"valid_for_current_ip_only": {
49-
"description": "[Optional] If you set this parameter during token creation, then the token created will only work for the IP address that was used to create the token",
50-
"type": "integer",
51-
"enum": [
52-
0,
53-
1
54-
]
55-
},
56-
"loginid": {
57-
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
58-
"type": "string",
59-
"pattern": "^[A-Za-z]+[0-9]+$"
60-
},
61-
"passthrough": {
62-
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
63-
"type": "object"
64-
},
65-
"req_id": {
66-
"description": "[Optional] Used to map request to response.",
67-
"type": "integer"
68-
}
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "API Token (request)",
4+
"description": "This call manages API tokens",
5+
"type": "object",
6+
"auth_required": 1,
7+
"auth_scopes": ["admin"],
8+
"additionalProperties": false,
9+
"required": ["api_token"],
10+
"properties": {
11+
"api_token": {
12+
"description": "Must be `1`",
13+
"type": "integer",
14+
"enum": [1]
15+
},
16+
"delete_token": {
17+
"description": "[Optional] The token to remove.",
18+
"type": "string",
19+
"pattern": "^\\w+$"
20+
},
21+
"new_token": {
22+
"description": "[Optional] The name of the created token.",
23+
"type": "string",
24+
"pattern": "^[A-Za-z0-9\\s_]+$"
25+
},
26+
"new_token_scopes": {
27+
"description": "[Optional] List of permission scopes to provide with the token.",
28+
"type": "array",
29+
"items": {
30+
"description": "Required when create new token",
31+
"type": "string",
32+
"enum": ["read", "trade", "trading_information", "payments", "admin"]
33+
},
34+
"uniqueItems": true
35+
},
36+
"valid_for_current_ip_only": {
37+
"description": "[Optional] If you set this parameter during token creation, then the token created will only work for the IP address that was used to create the token",
38+
"type": "integer",
39+
"enum": [0, 1]
40+
},
41+
"loginid": {
42+
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
43+
"type": "string",
44+
"pattern": "^[A-Za-z]+[0-9]+$"
45+
},
46+
"passthrough": {
47+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
48+
"type": "object"
49+
},
50+
"req_id": {
51+
"description": "[Optional] Used to map request to response.",
52+
"type": "integer"
6953
}
54+
}
7055
}

config/v3/app_delete/send.json

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"title": "Application: Delete (request)",
4-
"description": "The request for deleting an application.",
5-
"type": "object",
6-
"auth_required": 1,
7-
"auth_scopes": [
8-
"admin"
9-
],
10-
"additionalProperties": false,
11-
"required": [
12-
"app_delete"
13-
],
14-
"properties": {
15-
"app_delete": {
16-
"description": "Application app_id",
17-
"type": "integer"
18-
},
19-
"loginid": {
20-
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
21-
"type": "string",
22-
"pattern": "^[A-Za-z]+[0-9]+$"
23-
},
24-
"passthrough": {
25-
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
26-
"type": "object"
27-
},
28-
"req_id": {
29-
"description": "[Optional] Used to map request to response.",
30-
"type": "integer"
31-
}
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Application: Delete (request)",
4+
"description": "The request for deleting an application.",
5+
"type": "object",
6+
"auth_required": 1,
7+
"auth_scopes": ["admin"],
8+
"additionalProperties": false,
9+
"required": ["app_delete"],
10+
"properties": {
11+
"app_delete": {
12+
"description": "Application app_id",
13+
"type": "integer"
14+
},
15+
"loginid": {
16+
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
17+
"type": "string",
18+
"pattern": "^[A-Za-z]+[0-9]+$"
19+
},
20+
"passthrough": {
21+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
22+
"type": "object"
23+
},
24+
"req_id": {
25+
"description": "[Optional] Used to map request to response.",
26+
"type": "integer"
3227
}
28+
}
3329
}

config/v3/app_get/send.json

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"title": "Application: Get Details (request)",
4-
"description": "To get the information of the OAuth application specified by 'app_id'",
5-
"type": "object",
6-
"auth_required": 1,
7-
"auth_scopes": [
8-
"read"
9-
],
10-
"additionalProperties": false,
11-
"required": [
12-
"app_get"
13-
],
14-
"properties": {
15-
"app_get": {
16-
"description": "Application app_id",
17-
"type": "integer"
18-
},
19-
"loginid": {
20-
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
21-
"type": "string",
22-
"pattern": "^[A-Za-z]+[0-9]+$"
23-
},
24-
"passthrough": {
25-
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
26-
"type": "object"
27-
},
28-
"req_id": {
29-
"description": "[Optional] Used to map request to response.",
30-
"type": "integer"
31-
}
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Application: Get Details (request)",
4+
"description": "To get the information of the OAuth application specified by 'app_id'",
5+
"type": "object",
6+
"auth_required": 1,
7+
"auth_scopes": ["read"],
8+
"additionalProperties": false,
9+
"required": ["app_get"],
10+
"properties": {
11+
"app_get": {
12+
"description": "Application app_id",
13+
"type": "integer"
14+
},
15+
"loginid": {
16+
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
17+
"type": "string",
18+
"pattern": "^[A-Za-z]+[0-9]+$"
19+
},
20+
"passthrough": {
21+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
22+
"type": "object"
23+
},
24+
"req_id": {
25+
"description": "[Optional] Used to map request to response.",
26+
"type": "integer"
3227
}
28+
}
3329
}

0 commit comments

Comments
 (0)