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

Commit

Permalink
JSON Schema Update
Browse files Browse the repository at this point in the history
  • Loading branch information
nobody committed Dec 18, 2023
1 parent 5b99240 commit e00229d
Show file tree
Hide file tree
Showing 135 changed files with 13,713 additions and 10,978 deletions.
2 changes: 2 additions & 0 deletions _data/v3.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
groups:
- label: All Calls
methods:
- name: account_list
title: Account List
- name: active_symbols
title: Active Symbols
- name: api_token
Expand Down
3 changes: 3 additions & 0 deletions config/v3/account_list/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"account_list": 1
}
123 changes: 123 additions & 0 deletions config/v3/account_list/receive.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Account List (response)",
"description": "Returns all accounts belonging to the authorized user.",
"type": "object",
"required": [
"echo_req",
"msg_type"
],
"properties": {
"account_list": {
"description": "List of accounts for current user. This is also available from the `authroize` call.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"account_category",
"account_type",
"broker_code",
"created_at",
"currency",
"is_disabled",
"is_virtual",
"landing_company_name",
"linked_to",
"loginid"
],
"properties": {
"account_category": {
"description": "Account category.",
"type": "string",
"enum": [
"trading",
"wallet"
]
},
"account_type": {
"description": "Account type.",
"type": "string"
},
"broker": {
"description": "2 letter broker code.",
"type": "string"
},
"created_at": {
"description": "Creation time of the account as epoch.",
"type": "integer"
},
"currency": {
"description": "Currency of specified account.",
"type": "string"
},
"is_disabled": {
"description": "Boolean value: 1 or 0, indicating whether the account is marked as disabled or not.",
"type": "integer",
"enum": [
1,
0
]
},
"is_virtual": {
"description": "Boolean value: 1 or 0, indicating whether the account is a virtual-money account.",
"type": "integer",
"enum": [
1,
0
]
},
"landing_company_name": {
"description": "Landing company shortcode the account belongs to.",
"type": "string"
},
"linked_to": {
"description": "Details of the list of Trading accounts linked to the Wallet account.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"loginid": {
"description": "Account ID.",
"type": "string"
},
"platform": {
"description": "Account platform name.",
"type": "string",
"enum": [
"ctrader",
"derivez",
"dtrade",
"dwallet",
"dxtrade",
"mt5"
]
}
}
}
},
"loginid": {
"description": "The account ID of specified account.",
"type": "string"
}
}
}
},
"echo_req": {
"description": "Echo of the request made.",
"type": "object"
},
"msg_type": {
"description": "Action name of the request made.",
"type": "string",
"enum": [
"account_list"
]
},
"req_id": {
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
"type": "integer"
}
}
}
31 changes: 31 additions & 0 deletions config/v3/account_list/send.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Account List (request)",
"description": "Returns all accounts belonging to the authorized user.",
"type": "object",
"auth_required": 1,
"auth_scopes": [
"read"
],
"additionalProperties": false,
"required": [
"account_list"
],
"properties": {
"account_list": {
"description": "Must be `1`",
"type": "integer",
"enum": [
1
]
},
"passthrough": {
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.",
"type": "object"
},
"req_id": {
"description": "[Optional] Used to map request to response.",
"type": "integer"
}
}
}
173 changes: 114 additions & 59 deletions config/v3/active_symbols/send.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,117 @@
{
"$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"
]
},
"contract_type": {
"description": "[Optional] The proposed contract type",
"type": "array",
"items": {
"description": "",
"type": "string",
"enum": [
"MULTUP",
"MULTDOWN",
"UPORDOWN",
"EXPIRYRANGE",
"ONETOUCH",
"CALLE",
"LBHIGHLOW",
"ASIAND",
"EXPIRYRANGEE",
"DIGITDIFF",
"DIGITMATCH",
"DIGITOVER",
"PUTE",
"DIGITUNDER",
"NOTOUCH",
"CALL",
"RANGE",
"LBFLOATPUT",
"DIGITODD",
"PUT",
"ASIANU",
"LBFLOATCALL",
"EXPIRYMISSE",
"EXPIRYMISS",
"DIGITEVEN",
"TICKHIGH",
"TICKLOW",
"RESETCALL",
"RESETPUT",
"CALLSPREAD",
"PUTSPREAD",
"RUNHIGH",
"RUNLOW",
"ACCU",
"VANILLALONGCALL",
"VANILLALONGPUT",
"TURBOSLONG",
"TURBOSSHORT"
]
}
},
"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.",
"type": "object"
},
"req_id": {
"description": "[Optional] Used to map request to response.",
"type": "integer"
}
}
}
}
Loading

1 comment on commit e00229d

@vercel
Copy link

@vercel vercel bot commented on e00229d Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-api-docs – ./

deriv-api-docs.binary.sx
deriv-api-docs-git-master.binary.sx

Please sign in to comment.