Skip to content

Commit 4b9ced0

Browse files
committed
update openapi file
1 parent 47e721f commit 4b9ced0

File tree

2 files changed

+31
-16
lines changed

2 files changed

+31
-16
lines changed

finfeedapi/currencies-api-rest-realtime/spec/openapi.json

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"openapi": "3.0.1",
2+
"openapi": "3.0.4",
33
"info": {
44
"title": "FX Realtime REST API",
55
"contact": {
@@ -25,7 +25,7 @@
2525
"Metadata"
2626
],
2727
"summary": "List all assets",
28-
"description": "Retrieves all assets.\r\n \r\n:::info\r\nOur asset identifiers are aligned with the ISO 4217 currency codes standard only for fiat money (government or law regulated currency).\r\n:::\r\n \r\n:::info\r\nProperties of the output are providing aggregated information from across all symbols related to the specific asset. If you need to calculate your aggregation (e.g., limiting only the particular type of symbols), you should use /v1/symbols endpoint as a data source.\r\n:::",
28+
"description": "Retrieves all assets.\n \n:::info\nOur asset identifiers are aligned with the ISO 4217 currency codes standard only for fiat money (government or law regulated currency).\n:::\n \n:::info\nProperties of the output are providing aggregated information from across all symbols related to the specific asset. If you need to calculate your aggregation (e.g., limiting only the particular type of symbols), you should use /v1/symbols endpoint as a data source.\n:::",
2929
"parameters": [
3030
{
3131
"name": "filter_asset_id",
@@ -761,7 +761,7 @@
761761
"Exchange Rates"
762762
],
763763
"summary": "Get specific rate",
764-
"description": "Retrieves the exchange rate for a specific base and quote asset at a given time or the current rate.\r\n \r\n:::info\r\nIf you are using an exchange rate for mission-critical operations, then for best reliability, you should measure the difference between current time and the time returned from the response to ensure that value of the difference between those meets your internal requirements.\r\n:::",
764+
"description": "Retrieves the exchange rate for a specific base and quote asset at a given time or the current rate.\n \n:::info\nIf you are using an exchange rate for mission-critical operations, then for best reliability, you should measure the difference between current time and the time returned from the response to ensure that value of the difference between those meets your internal requirements.\n:::",
765765
"operationId": "Get specific rate",
766766
"parameters": [
767767
{
@@ -794,7 +794,7 @@
794794
"examples": {
795795
"Example response": {
796796
"value": {
797-
"time": "2025-06-10T06:14:59.1808726Z",
797+
"time": "2025-06-10T12:37:59.0932890Z",
798798
"asset_id_base": "BTC",
799799
"asset_id_quote": "USD",
800800
"rate": 10000.0
@@ -809,7 +809,7 @@
809809
"examples": {
810810
"Example response": {
811811
"value": {
812-
"time": "2025-06-10T06:14:59.1808726Z",
812+
"time": "2025-06-10T12:37:59.0932890Z",
813813
"asset_id_base": "BTC",
814814
"asset_id_quote": "USD",
815815
"rate": 10000.0
@@ -824,7 +824,7 @@
824824
"examples": {
825825
"Example response": {
826826
"value": {
827-
"time": "2025-06-10T06:14:59.1808726Z",
827+
"time": "2025-06-10T12:37:59.0932890Z",
828828
"asset_id_base": "BTC",
829829
"asset_id_quote": "USD",
830830
"rate": 10000.0
@@ -839,7 +839,7 @@
839839
"examples": {
840840
"Example response": {
841841
"value": {
842-
"time": "2025-06-10T06:14:59.1808726Z",
842+
"time": "2025-06-10T12:37:59.0932890Z",
843843
"asset_id_base": "BTC",
844844
"asset_id_quote": "USD",
845845
"rate": 10000.0
@@ -858,7 +858,7 @@
858858
"Exchange Rates"
859859
],
860860
"summary": "Get all current rates",
861-
"description": "Get the current exchange rate between requested asset and all other assets.\r\n \r\n:::info\r\nIf you are using an exchange rate for mission-critical operations, then for best reliability, you should measure the difference between current time and the time returned from the response to ensure that value of the difference between those meets your internal requirements.\r\n:::\r\n \r\n:::info\r\nYou can invert the rates by using Y = 1 / X equation, for example BTC/USD = 1 / (USD/BTC);\r\n:::",
861+
"description": "Get the current exchange rate between requested asset and all other assets.\n \n:::info\nIf you are using an exchange rate for mission-critical operations, then for best reliability, you should measure the difference between current time and the time returned from the response to ensure that value of the difference between those meets your internal requirements.\n:::\n \n:::info\nYou can invert the rates by using Y = 1 / X equation, for example BTC/USD = 1 / (USD/BTC);\n:::",
862862
"parameters": [
863863
{
864864
"name": "asset_id_base",
@@ -1285,12 +1285,21 @@
12851285
"description": "API Key is required to access the endpoints",
12861286
"name": "Authorization",
12871287
"in": "header"
1288+
},
1289+
"JWT": {
1290+
"type": "apiKey",
1291+
"description": "JWT token needed to access the endpoints",
1292+
"name": "Authorization",
1293+
"in": "header"
12881294
}
12891295
}
12901296
},
12911297
"security": [
12921298
{
12931299
"APIKey": [ ]
1300+
},
1301+
{
1302+
"JWT": [ ]
12941303
}
12951304
],
12961305
"tags": [

finfeedapi/currencies-api-rest-realtime/spec/openapi.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.0.1
1+
openapi: 3.0.4
22
info:
33
title: FX Realtime REST API
44
contact:
@@ -17,7 +17,7 @@ paths:
1717
tags:
1818
- Metadata
1919
summary: List all assets
20-
description: "Retrieves all assets.\r\n \r\n:::info\r\nOur asset identifiers are aligned with the ISO 4217 currency codes standard only for fiat money (government or law regulated currency).\r\n:::\r\n \r\n:::info\r\nProperties of the output are providing aggregated information from across all symbols related to the specific asset. If you need to calculate your aggregation (e.g., limiting only the particular type of symbols), you should use /v1/symbols endpoint as a data source.\r\n:::"
20+
description: "Retrieves all assets.\n \n:::info\nOur asset identifiers are aligned with the ISO 4217 currency codes standard only for fiat money (government or law regulated currency).\n:::\n \n:::info\nProperties of the output are providing aggregated information from across all symbols related to the specific asset. If you need to calculate your aggregation (e.g., limiting only the particular type of symbols), you should use /v1/symbols endpoint as a data source.\n:::"
2121
parameters:
2222
- name: filter_asset_id
2323
in: query
@@ -663,7 +663,7 @@ paths:
663663
tags:
664664
- Exchange Rates
665665
summary: Get specific rate
666-
description: "Retrieves the exchange rate for a specific base and quote asset at a given time or the current rate.\r\n \r\n:::info\r\nIf you are using an exchange rate for mission-critical operations, then for best reliability, you should measure the difference between current time and the time returned from the response to ensure that value of the difference between those meets your internal requirements.\r\n:::"
666+
description: "Retrieves the exchange rate for a specific base and quote asset at a given time or the current rate.\n \n:::info\nIf you are using an exchange rate for mission-critical operations, then for best reliability, you should measure the difference between current time and the time returned from the response to ensure that value of the difference between those meets your internal requirements.\n:::"
667667
operationId: Get specific rate
668668
parameters:
669669
- name: asset_id_base
@@ -688,7 +688,7 @@ paths:
688688
examples:
689689
Example response:
690690
value: {
691-
"time": "2025-06-10T06:14:59.3308604Z",
691+
"time": "2025-06-10T12:37:59.2072426Z",
692692
"asset_id_base": "BTC",
693693
"asset_id_quote": "USD",
694694
"rate": 10000.0
@@ -699,7 +699,7 @@ paths:
699699
examples:
700700
Example response:
701701
value: {
702-
"time": "2025-06-10T06:14:59.3308604Z",
702+
"time": "2025-06-10T12:37:59.2072426Z",
703703
"asset_id_base": "BTC",
704704
"asset_id_quote": "USD",
705705
"rate": 10000.0
@@ -710,7 +710,7 @@ paths:
710710
examples:
711711
Example response:
712712
value: {
713-
"time": "2025-06-10T06:14:59.3308604Z",
713+
"time": "2025-06-10T12:37:59.2072426Z",
714714
"asset_id_base": "BTC",
715715
"asset_id_quote": "USD",
716716
"rate": 10000.0
@@ -721,7 +721,7 @@ paths:
721721
examples:
722722
Example response:
723723
value: {
724-
"time": "2025-06-10T06:14:59.3308604Z",
724+
"time": "2025-06-10T12:37:59.2072426Z",
725725
"asset_id_base": "BTC",
726726
"asset_id_quote": "USD",
727727
"rate": 10000.0
@@ -731,7 +731,7 @@ paths:
731731
tags:
732732
- Exchange Rates
733733
summary: Get all current rates
734-
description: "Get the current exchange rate between requested asset and all other assets.\r\n \r\n:::info\r\nIf you are using an exchange rate for mission-critical operations, then for best reliability, you should measure the difference between current time and the time returned from the response to ensure that value of the difference between those meets your internal requirements.\r\n:::\r\n \r\n:::info\r\nYou can invert the rates by using Y = 1 / X equation, for example BTC/USD = 1 / (USD/BTC);\r\n:::"
734+
description: "Get the current exchange rate between requested asset and all other assets.\n \n:::info\nIf you are using an exchange rate for mission-critical operations, then for best reliability, you should measure the difference between current time and the time returned from the response to ensure that value of the difference between those meets your internal requirements.\n:::\n \n:::info\nYou can invert the rates by using Y = 1 / X equation, for example BTC/USD = 1 / (USD/BTC);\n:::"
735735
parameters:
736736
- name: asset_id_base
737737
in: path
@@ -1075,8 +1075,14 @@ components:
10751075
description: API Key is required to access the endpoints
10761076
name: Authorization
10771077
in: header
1078+
JWT:
1079+
type: apiKey
1080+
description: JWT token needed to access the endpoints
1081+
name: Authorization
1082+
in: header
10781083
security:
10791084
- APIKey: [ ]
1085+
- JWT: [ ]
10801086
tags:
10811087
- name: Exchange Rates
10821088
description: "\n<span data-status-page=\"28924\"></span>\nExchange rate is defined as (VWAP-24H) last 24 hour (rolling window over time) Volume Weighted Average Price across multiple data sources listed on our platform. We are selecting and managing the data sources that are used in the calculation based on multiple factors to provide data of highest quality. \n\nAlgorithm is described below:\n\n 1. Exchange rates are produced from quotes, trades, and metadata datasets.\n 1. Symbols that are not data_type = \"SPOT\" are excluded from the calculation.\n 1. Symbols from the data sources that were marked by us as not legitimate are excluded from the calculation.\n 1. Quotes data where the spread is outside the range of ```<0$; 67%>``` are discarded. `spreadPrc = (ask - bid) / ((ask + bid) / 2)`\n 1. The midpoint from the quote data is used as a pricing reference and it's weighted by the passive cumulative volume resting on the best prices.\n 1. Volume from the trades is used to weight the midpoint prices in the VWAP24 algorithm.\n 1. Midpoint data that has not been updated in the last 5 minutes and 1 second is discarded.\n 1. The last 24-hour volume for each symbol is updated every 4 hours when approximately 20% of the data in the sliding window changes (also, the list of eligible markets is updated at the same time).\n 1. Everywhere in the algorithm below, we are using asset pairs only from exchanges that have the highest legitimacy rank, and the rest of the exchanges are discarded. As we establish the highest-ranking exchanges that have this data for each asset pair, we ensure that the highest quality data is used for each of them. The rank used for asset pairing is carried over to the following steps.\n 1. Every 1 second, we update VWAP24 data for every asset pair across all data sources.\n 1. For each asset pair, we also discard data that is outside the 3 sigma range if there are at least 3 exchanges for this asset pair.\n 1. From the VWAP24 data, we are creating a tree structure where node/vertex = asset and edge = rate.\n 1. By traversing the tree structure using the BFS algorithm and our secret sauce, we are able to establish the final exchange rates.\n "

0 commit comments

Comments
 (0)