Skip to content

Commit

Permalink
Merge pull request binary-com#268 from sanjam-deriv/websocket-update
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjam-deriv authored Dec 13, 2023
2 parents f3d1a96 + 705b512 commit 2393dd0
Show file tree
Hide file tree
Showing 132 changed files with 10,997 additions and 13,241 deletions.
125 changes: 59 additions & 66 deletions config/v3/active_symbols/send.json
Original file line number Diff line number Diff line change
@@ -1,69 +1,62 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Active Symbols (request)",
"description": "Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).",
"type": "object",
"auth_required": 0,
"additionalProperties": false,
"required": [
"active_symbols"
],
"properties": {
"active_symbols": {
"description": "If you use `brief`, only a subset of fields will be returned.",
"type": "string",
"enum": [
"brief",
"full"
]
},
"landing_company": {
"description": "Deprecated - replaced by landing_company_short.",
"type": "string",
"enum": [
"iom",
"malta",
"maltainvest",
"svg",
"virtual",
"vanuatu",
"champion",
"champion-virtual"
]
},
"landing_company_short": {
"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.",
"type": "string",
"enum": [
"iom",
"malta",
"maltainvest",
"svg",
"virtual",
"vanuatu",
"champion",
"champion-virtual"
]
},
"product_type": {
"description": "[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.",
"type": "string",
"enum": [
"basic"
]
},
"loginid": {
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
"type": "string",
"pattern": "^[A-Za-z]+[0-9]+$"
},
"passthrough": {
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
"type": "object"
},
"req_id": {
"description": "[Optional] Used to map request to response.",
"type": "integer"
}
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Active Symbols (request)",
"description": "Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).",
"type": "object",
"auth_required": 0,
"additionalProperties": false,
"required": ["active_symbols"],
"properties": {
"active_symbols": {
"description": "If you use `brief`, only a subset of fields will be returned.",
"type": "string",
"enum": ["brief", "full"]
},
"landing_company": {
"description": "Deprecated - replaced by landing_company_short.",
"type": "string",
"enum": [
"iom",
"malta",
"maltainvest",
"svg",
"virtual",
"vanuatu",
"champion",
"champion-virtual"
]
},
"landing_company_short": {
"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.",
"type": "string",
"enum": [
"iom",
"malta",
"maltainvest",
"svg",
"virtual",
"vanuatu",
"champion",
"champion-virtual"
]
},
"product_type": {
"description": "[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.",
"type": "string",
"enum": ["basic"]
},
"loginid": {
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
"type": "string",
"pattern": "^[A-Za-z]+[0-9]+$"
},
"passthrough": {
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
"type": "object"
},
"req_id": {
"description": "[Optional] Used to map request to response.",
"type": "integer"
}
}
}
119 changes: 52 additions & 67 deletions config/v3/api_token/send.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,55 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "API Token (request)",
"description": "This call manages API tokens",
"type": "object",
"auth_required": 1,
"auth_scopes": [
"admin"
],
"additionalProperties": false,
"required": [
"api_token"
],
"properties": {
"api_token": {
"description": "Must be `1`",
"type": "integer",
"enum": [
1
]
},
"delete_token": {
"description": "[Optional] The token to remove.",
"type": "string",
"pattern": "^\\w+$"
},
"new_token": {
"description": "[Optional] The name of the created token.",
"type": "string",
"pattern": "^[A-Za-z0-9\\s_]+$"
},
"new_token_scopes": {
"description": "[Optional] List of permission scopes to provide with the token.",
"type": "array",
"items": {
"description": "Required when create new token",
"type": "string",
"enum": [
"read",
"trade",
"trading_information",
"payments",
"admin"
]
},
"uniqueItems": true
},
"valid_for_current_ip_only": {
"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",
"type": "integer",
"enum": [
0,
1
]
},
"loginid": {
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
"type": "string",
"pattern": "^[A-Za-z]+[0-9]+$"
},
"passthrough": {
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
"type": "object"
},
"req_id": {
"description": "[Optional] Used to map request to response.",
"type": "integer"
}
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "API Token (request)",
"description": "This call manages API tokens",
"type": "object",
"auth_required": 1,
"auth_scopes": ["admin"],
"additionalProperties": false,
"required": ["api_token"],
"properties": {
"api_token": {
"description": "Must be `1`",
"type": "integer",
"enum": [1]
},
"delete_token": {
"description": "[Optional] The token to remove.",
"type": "string",
"pattern": "^\\w+$"
},
"new_token": {
"description": "[Optional] The name of the created token.",
"type": "string",
"pattern": "^[A-Za-z0-9\\s_]+$"
},
"new_token_scopes": {
"description": "[Optional] List of permission scopes to provide with the token.",
"type": "array",
"items": {
"description": "Required when create new token",
"type": "string",
"enum": ["read", "trade", "trading_information", "payments", "admin"]
},
"uniqueItems": true
},
"valid_for_current_ip_only": {
"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",
"type": "integer",
"enum": [0, 1]
},
"loginid": {
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
"type": "string",
"pattern": "^[A-Za-z]+[0-9]+$"
},
"passthrough": {
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
"type": "object"
},
"req_id": {
"description": "[Optional] Used to map request to response.",
"type": "integer"
}
}
}
56 changes: 26 additions & 30 deletions config/v3/app_delete/send.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Application: Delete (request)",
"description": "The request for deleting an application.",
"type": "object",
"auth_required": 1,
"auth_scopes": [
"admin"
],
"additionalProperties": false,
"required": [
"app_delete"
],
"properties": {
"app_delete": {
"description": "Application app_id",
"type": "integer"
},
"loginid": {
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
"type": "string",
"pattern": "^[A-Za-z]+[0-9]+$"
},
"passthrough": {
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
"type": "object"
},
"req_id": {
"description": "[Optional] Used to map request to response.",
"type": "integer"
}
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Application: Delete (request)",
"description": "The request for deleting an application.",
"type": "object",
"auth_required": 1,
"auth_scopes": ["admin"],
"additionalProperties": false,
"required": ["app_delete"],
"properties": {
"app_delete": {
"description": "Application app_id",
"type": "integer"
},
"loginid": {
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
"type": "string",
"pattern": "^[A-Za-z]+[0-9]+$"
},
"passthrough": {
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
"type": "object"
},
"req_id": {
"description": "[Optional] Used to map request to response.",
"type": "integer"
}
}
}
56 changes: 26 additions & 30 deletions config/v3/app_get/send.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Application: Get Details (request)",
"description": "To get the information of the OAuth application specified by 'app_id'",
"type": "object",
"auth_required": 1,
"auth_scopes": [
"read"
],
"additionalProperties": false,
"required": [
"app_get"
],
"properties": {
"app_get": {
"description": "Application app_id",
"type": "integer"
},
"loginid": {
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
"type": "string",
"pattern": "^[A-Za-z]+[0-9]+$"
},
"passthrough": {
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
"type": "object"
},
"req_id": {
"description": "[Optional] Used to map request to response.",
"type": "integer"
}
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Application: Get Details (request)",
"description": "To get the information of the OAuth application specified by 'app_id'",
"type": "object",
"auth_required": 1,
"auth_scopes": ["read"],
"additionalProperties": false,
"required": ["app_get"],
"properties": {
"app_get": {
"description": "Application app_id",
"type": "integer"
},
"loginid": {
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
"type": "string",
"pattern": "^[A-Za-z]+[0-9]+$"
},
"passthrough": {
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.",
"type": "object"
},
"req_id": {
"description": "[Optional] Used to map request to response.",
"type": "integer"
}
}
}
Loading

0 comments on commit 2393dd0

Please sign in to comment.