Skip to content

Commit

Permalink
JSON Schema Update
Browse files Browse the repository at this point in the history
  • Loading branch information
nobody committed May 1, 2024
1 parent 90dff9e commit be53a2e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
32 changes: 31 additions & 1 deletion config/v3/exchange_rates/receive.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,37 @@
"patternProperties": {
"^[a-zA-Z0-9]{2,20}$": {
"description": "The rate of exchanging a unit of the base currency into a target currency (represented by the key)",
"type": "number"
"type": [
"number",
"object"
],
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"spot_rate"
],
"properties": {
"ask_rate": {
"description": "[Optional] The ask rate of exchanging a unit of the base currency into a target currency",
"type": "number"
},
"bid_rate": {
"description": "[Optional] The bid rate of exchanging a unit of the base currency into a target currency",
"type": "number"
},
"spot_rate": {
"description": "The spot rate of exchanging a unit of the base currency into a target currency",
"type": "number"
}
}
},
{
"description": "The rate of exchanging a unit of the base currency into a target currency (represented by the key)",
"type": "number"
}
]
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions config/v3/exchange_rates/send.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
"type": "string",
"pattern": "^[a-zA-Z0-9]{2,20}$"
},
"include_spread": {
"description": "[Optional] 1 - Request for ask and bid rates along with the spot rate. Only available if target_currency is provided.",
"type": "integer",
"enum": [
1
]
},
"subscribe": {
"description": "[Optional] 1 - to initiate a realtime stream of exchange rates relative to base currency.",
"type": "integer",
Expand Down

0 comments on commit be53a2e

Please sign in to comment.