diff --git a/_data/v3.yml b/_data/v3.yml index d9bb35ef..c113d56b 100644 --- a/_data/v3.yml +++ b/_data/v3.yml @@ -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 diff --git a/config/v3/contracts_for_company/example.json b/config/v3/contracts_for_company/example.json new file mode 100644 index 00000000..f4fb76ed --- /dev/null +++ b/config/v3/contracts_for_company/example.json @@ -0,0 +1,3 @@ +{ + "contracts_for_company": 1 +} diff --git a/config/v3/contracts_for_company/receive.json b/config/v3/contracts_for_company/receive.json new file mode 100644 index 00000000..9f74b893 --- /dev/null +++ b/config/v3/contracts_for_company/receive.json @@ -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" + } + } +} diff --git a/config/v3/contracts_for_company/send.json b/config/v3/contracts_for_company/send.json new file mode 100644 index 00000000..dd140422 --- /dev/null +++ b/config/v3/contracts_for_company/send.json @@ -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" + } + } +}