Skip to content

Commit

Permalink
JSON Schema Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Workflow committed Jun 12, 2024
1 parent ed37e01 commit f2bcfa9
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _data/v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ groups:
title: Update Contract History
- name: contracts_for
title: Contracts For Symbol
- name: contracts_for_company
title: Contracts For Company
- name: copy_start
title: 'Copy Trading: Start'
- name: copy_stop
Expand Down
3 changes: 3 additions & 0 deletions config/v3/contracts_for_company/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"contracts_for_company": 1
}
114 changes: 114 additions & 0 deletions config/v3/contracts_for_company/receive.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Contracts For Company (response)",
"description": "Get the list of currently available contracts for a given landing company.",
"type": "object",
"required": [
"echo_req",
"msg_type"
],
"properties": {
"contracts_for_company": {
"title": "contracts_for_company",
"description": "List of available contracts for a given landing company.",
"type": "object",
"additionalProperties": false,
"required": [
"available",
"hit_count"
],
"properties": {
"available": {
"description": "List of available contracts.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"barrier_category",
"contract_category",
"contract_category_display",
"contract_display",
"contract_type",
"sentiment"
],
"properties": {
"barrier_category": {
"description": "Category of contract barrier.",
"type": "string",
"examples": [
"american",
"asian",
"euro_atm",
"euro_non_atm"
]
},
"contract_category": {
"description": "Category of contract.",
"type": "string",
"examples": [
"asian",
"callput"
]
},
"contract_category_display": {
"description": "Display name for the contract category, localized to selected language.",
"type": "string",
"examples": [
"Asians",
"Up/Down"
]
},
"contract_display": {
"description": "Display name for the contract, localized to selected language.",
"type": "string",
"examples": [
"Asian Up",
"Higher"
]
},
"contract_type": {
"description": "Type of contract.",
"type": "string",
"examples": [
"ASIANU",
"CALL"
]
},
"sentiment": {
"description": "Type of sentiment.",
"type": "string",
"examples": [
"differ",
"down",
"match",
"up"
]
}
}
},
"minItems": 1
},
"hit_count": {
"description": "Count of contracts available",
"type": "number"
}
}
},
"echo_req": {
"description": "Echo of the request made.",
"type": "object"
},
"msg_type": {
"description": "Action name of the request made.",
"type": "string",
"enum": [
"contracts_for_company"
]
},
"req_id": {
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
"type": "integer"
}
}
}
46 changes: 46 additions & 0 deletions config/v3/contracts_for_company/send.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Contracts For Company (request)",
"description": "Get the list of currently available contracts for a given landing company.",
"type": "object",
"auth_required": 0,
"additionalProperties": false,
"required": [
"contracts_for_company"
],
"properties": {
"contracts_for_company": {
"description": "Must be `1`",
"type": "integer",
"enum": [
1
]
},
"landing_company": {
"description": "[Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field.",
"type": "string",
"default": "virtual",
"enum": [
"iom",
"malta",
"maltainvest",
"svg",
"virtual",
"vanuatu"
]
},
"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"
}
}
}

0 comments on commit f2bcfa9

Please sign in to comment.