Skip to content

Commit

Permalink
chore: add response type for getChartRates
Browse files Browse the repository at this point in the history
  • Loading branch information
mois-ilya committed Oct 17, 2024
1 parent 337e7b9 commit e71337a
Show file tree
Hide file tree
Showing 5 changed files with 277 additions and 68 deletions.
122 changes: 78 additions & 44 deletions api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,8 @@
},
"value": {
"example": "10000000000",
"type": "string"
"type": "string",
"x-js-format": "bigint"
}
},
"required": [
Expand Down Expand Up @@ -1447,7 +1448,7 @@
"type": "integer"
},
"shard": {
"example": 800000000000000,
"example": "800000000000000",
"type": "string"
},
"workchain": {
Expand Down Expand Up @@ -1660,7 +1661,7 @@
"type": "integer"
},
"shard": {
"example": 8000000000000000,
"example": "8000000000000000",
"type": "string"
},
"start_lt": {
Expand Down Expand Up @@ -2841,7 +2842,8 @@
},
"op_code": {
"example": "0xdeadbeaf",
"type": "string"
"type": "string",
"x-js-format": "bigint"
}
},
"required": [
Expand Down Expand Up @@ -3330,7 +3332,8 @@
"properties": {
"balance": {
"example": "1000000000",
"type": "string"
"type": "string",
"x-js-format": "bigint"
},
"decimals": {
"example": 9,
Expand Down Expand Up @@ -3376,7 +3379,8 @@
"amount": {
"description": "amount in minimal particles",
"example": "123456789",
"type": "string"
"type": "string",
"x-js-format": "bigint"
},
"decimals": {
"example": 9,
Expand Down Expand Up @@ -3412,7 +3416,8 @@
"amount": {
"description": "amount in minimal particles",
"example": "123456789",
"type": "string"
"type": "string",
"x-js-format": "bigint"
},
"comment": {
"example": "Hi! This is your salary. \nFrom accounting with love.",
Expand Down Expand Up @@ -3454,8 +3459,9 @@
"JettonBalance": {
"properties": {
"balance": {
"example": 597968399,
"type": "string"
"example": "597968399",
"type": "string",
"x-js-format": "bigint"
},
"extensions": {
"example": [
Expand All @@ -3473,8 +3479,9 @@
"lock": {
"properties": {
"amount": {
"example": 597968399,
"type": "string"
"example": "597968399",
"type": "string",
"x-js-format": "bigint"
},
"till": {
"example": 1678223064,
Expand Down Expand Up @@ -3581,8 +3588,9 @@
"properties": {
"amount": {
"description": "amount in quanta of tokens",
"example": 1000000000,
"type": "string"
"example": "1000000000",
"type": "string",
"x-js-format": "bigint"
},
"jetton": {
"$ref": "#/components/schemas/JettonPreview"
Expand Down Expand Up @@ -3617,7 +3625,8 @@
"balance": {
"description": "balance in the smallest jetton's units",
"example": "168856200518084",
"type": "string"
"type": "string",
"x-js-format": "bigint"
},
"owner": {
"$ref": "#/components/schemas/AccountAddress"
Expand Down Expand Up @@ -3664,7 +3673,8 @@
},
"total_supply": {
"example": "5887105890579978",
"type": "string"
"type": "string",
"x-js-format": "bigint"
},
"verification": {
"$ref": "#/components/schemas/JettonVerificationType"
Expand Down Expand Up @@ -3753,8 +3763,9 @@
"properties": {
"amount": {
"description": "amount in quanta of tokens",
"example": 1000000000,
"type": "string"
"example": "1000000000",
"type": "string",
"x-js-format": "bigint"
},
"jetton": {
"$ref": "#/components/schemas/JettonPreview"
Expand Down Expand Up @@ -3823,7 +3834,8 @@
},
"quantity": {
"example": "597968399",
"type": "string"
"type": "string",
"x-js-format": "bigint"
},
"wallet_address": {
"$ref": "#/components/schemas/AccountAddress"
Expand All @@ -3840,11 +3852,13 @@
"properties": {
"amount_in": {
"example": "1660050553",
"type": "string"
"type": "string",
"x-js-format": "bigint"
},
"amount_out": {
"example": "1660050553",
"type": "string"
"type": "string",
"x-js-format": "bigint"
},
"dex": {
"enum": [
Expand Down Expand Up @@ -3892,8 +3906,9 @@
"properties": {
"amount": {
"description": "amount in quanta of tokens",
"example": 1000000000,
"type": "string"
"example": "1000000000",
"type": "string",
"x-js-format": "bigint"
},
"comment": {
"example": "Hi! This is your salary. \nFrom accounting with love.",
Expand Down Expand Up @@ -4079,7 +4094,8 @@
},
"op_code": {
"example": "0xdeadbeaf",
"type": "string"
"type": "string",
"x-js-format": "bigint"
},
"raw_body": {
"description": "hex-encoded BoC with raw message body",
Expand Down Expand Up @@ -4469,7 +4485,9 @@
"type": "string"
},
"approved_by": {
"$ref": "#/components/schemas/NftApprovedBy"
"$ref": "#/components/schemas/NftApprovedBy",
"deprecated": true,
"description": "please use trust field"
},
"collection": {
"properties": {
Expand Down Expand Up @@ -4528,6 +4546,7 @@
"$ref": "#/components/schemas/TrustType"
},
"verified": {
"description": "Collection master contract confirmed that this item is part of collection",
"example": true,
"type": "boolean"
}
Expand Down Expand Up @@ -4813,7 +4832,8 @@
},
"value": {
"example": "123000000000",
"type": "string"
"type": "string",
"x-js-format": "bigint"
}
},
"required": [
Expand Down Expand Up @@ -4843,11 +4863,7 @@
},
"parent": {
"items": {
"example": [
"(0",
21734018,
"8000000000000000)"
],
"example": "[ (0,21734018,8000000000000000) ]",
"type": "string"
},
"type": "array"
Expand All @@ -4858,16 +4874,12 @@
"type": "integer"
},
"shard": {
"example": 8000000000000000,
"example": "8000000000000000",
"type": "string"
},
"shards_blocks": {
"items": {
"example": [
"(0",
4234235,
"8000000000000000)"
],
"example": "[ (0,4234235,8000000000000000) ]",
"type": "string"
},
"type": "array"
Expand Down Expand Up @@ -5061,7 +5073,8 @@
"commission": {
"description": "Commission for the transaction. In nanocoins.",
"example": "1000000",
"type": "string"
"type": "string",
"x-js-format": "bigint"
},
"from": {
"example": "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf",
Expand Down Expand Up @@ -5827,6 +5840,7 @@
"items": {
"properties": {
"adnl_addr": {
"example": "45061C1D4EC44A937D0318589E13C73D151D1CEF5D3C0E53AFBCF56A6C2FE2BD",
"type": "string"
},
"public_key": {
Expand Down Expand Up @@ -5854,7 +5868,8 @@
},
"total_weight": {
"example": "1152921504606846800",
"type": "string"
"type": "string",
"x-js-format": "bigint"
},
"utime_since": {
"type": "integer"
Expand Down Expand Up @@ -6065,11 +6080,11 @@
"type": "integer"
},
"zerostate_file_hash": {
"example": 1000000,
"example": "A6A0BD6608672B11B79538A50B2204E748305C12AA0DED9C16CF0006CE3AF8DB",
"type": "string"
},
"zerostate_root_hash": {
"example": 1000000,
"example": "131D0C65055F04E9C19D687B51BC70F952FD9CA6F02C2801D3B89964A779DF85",
"type": "string"
}
},
Expand Down Expand Up @@ -6100,7 +6115,7 @@
"title": "REST api to TON blockchain explorer",
"version": "2.0.0"
},
"openapi": "3.0.2",
"openapi": "3.1.0",
"paths": {
"/v2/accounts/_bulk": {
"post": {
Expand Down Expand Up @@ -8124,7 +8139,8 @@
"required": true,
"schema": {
"example": "1000000000",
"type": "string"
"type": "string",
"x-js-format": "bigint"
}
},
{
Expand Down Expand Up @@ -9861,6 +9877,7 @@
"name": "token",
"required": true,
"schema": {
"format": "address",
"type": "string"
}
},
Expand Down Expand Up @@ -9915,8 +9932,25 @@
"schema": {
"properties": {
"points": {
"additionalProperties": true,
"example": {}
"items": {
"additionalItems": false,
"example": [
1668436763,
97.21323234
],
"items": [
{
"description": "Unix timestamp (int64)",
"type": "integer"
},
{
"description": "Value (float or decimal)",
"type": "number"
}
],
"type": "array"
},
"type": "array"
}
},
"required": [
Expand Down
15 changes: 12 additions & 3 deletions api/openapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.0.2
openapi: 3.1.0
info:
title: REST api to TON blockchain explorer
version: 2.0.0
Expand Down Expand Up @@ -1822,6 +1822,7 @@ paths:
required: true
schema:
type: string
format: address
- in: query
name: currency
required: false
Expand Down Expand Up @@ -1864,8 +1865,16 @@ paths:
- points
properties:
points:
additionalProperties: true
example: { }
type: array
items:
type: array
items:
- type: integer
description: Unix timestamp (int64)
- type: number
description: Value (float or decimal)
additionalItems: false
example: [1668436763, 97.21323234]
'default':
$ref: '#/components/responses/Error'
/v2/rates/markets:
Expand Down
Loading

0 comments on commit e71337a

Please sign in to comment.