Skip to content

Commit f53022e

Browse files
committed
Auto-generate SDK for CoinAPI Market Data API REST Historical
1 parent d15e07f commit f53022e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+309
-293
lines changed

coinapi/market-data-api-rest/sdk/csharp/APIBricks.CoinAPI.MarketDataAPI.REST.V1.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 2012
33
VisualStudioVersion = 12.0.0.0
44
MinimumVisualStudioVersion = 10.0.0.1
5-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "APIBricks.CoinAPI.MarketDataAPI.REST.V1", "src\APIBricks.CoinAPI.MarketDataAPI.REST.V1\APIBricks.CoinAPI.MarketDataAPI.REST.V1.csproj", "{D8CE7272-D6C0-4828-A0DD-61EBF1386FE0}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "APIBricks.CoinAPI.MarketDataAPI.REST.V1", "src\APIBricks.CoinAPI.MarketDataAPI.REST.V1\APIBricks.CoinAPI.MarketDataAPI.REST.V1.csproj", "{DBBF3BCF-E609-4C9E-9F47-831B50235036}"
66
EndProject
77
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "APIBricks.CoinAPI.MarketDataAPI.REST.V1.Test", "src\APIBricks.CoinAPI.MarketDataAPI.REST.V1.Test\APIBricks.CoinAPI.MarketDataAPI.REST.V1.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
88
EndProject
@@ -12,10 +12,10 @@ Global
1212
Release|Any CPU = Release|Any CPU
1313
EndGlobalSection
1414
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15-
{D8CE7272-D6C0-4828-A0DD-61EBF1386FE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{D8CE7272-D6C0-4828-A0DD-61EBF1386FE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{D8CE7272-D6C0-4828-A0DD-61EBF1386FE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{D8CE7272-D6C0-4828-A0DD-61EBF1386FE0}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{DBBF3BCF-E609-4C9E-9F47-831B50235036}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{DBBF3BCF-E609-4C9E-9F47-831B50235036}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{DBBF3BCF-E609-4C9E-9F47-831B50235036}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{DBBF3BCF-E609-4C9E-9F47-831B50235036}.Release|Any CPU.Build.0 = Release|Any CPU
1919
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2020
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
2121
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU

coinapi/market-data-api-rest/sdk/csharp/api/openapi.yaml

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -15,69 +15,73 @@ security:
1515
- APIKey: []
1616
- JWT: []
1717
tags:
18-
- description: "\nExchange rate is defined as (VWAP-24H) last 24 hour (rolling window\
18+
- description: "\r\nExchange rate is defined as (VWAP-24H) last 24 hour (rolling window\
1919
\ over time) Volume Weighted Average Price across multiple data sources listed\
2020
\ on our platform. We are selecting and managing the data sources that are used\
2121
\ in the calculation based on multiple factors to provide data of highest quality.\
22-
\ \n\nAlgorithm is described below:\n\n 1. Exchange rates are produced from quotes,\
23-
\ trades, and metadata datasets.\n 1. Symbols that are not data_type = \"SPOT\"\
24-
\ are excluded from the calculation.\n 1. Symbols from the data sources that\
25-
\ were marked by us as not legitimate are excluded from the calculation.\n 1.\
26-
\ Quotes data where the spread is outside the range of ```<0$; 67%>``` are discarded.\
27-
\ `spreadPrc = (ask - bid) / ((ask + bid) / 2)`\n 1. The midpoint from the quote\
28-
\ data is used as a pricing reference and it's weighted by the passive cumulative\
29-
\ volume resting on the best prices.\n 1. Volume from the trades is used to weight\
30-
\ the midpoint prices in the VWAP24 algorithm.\n 1. Midpoint data that has not\
31-
\ been updated in the last 5 minutes and 1 second is discarded.\n 1. The last\
32-
\ 24-hour volume for each symbol is updated every 4 hours when approximately 20%\
33-
\ of the data in the sliding window changes (also, the list of eligible markets\
34-
\ is updated at the same time).\n 1. Everywhere in the algorithm below, we are\
35-
\ using asset pairs only from exchanges that have the highest legitimacy rank,\
36-
\ and the rest of the exchanges are discarded. As we establish the highest-ranking\
37-
\ exchanges that have this data for each asset pair, we ensure that the highest\
38-
\ quality data is used for each of them. The rank used for asset pairing is carried\
39-
\ over to the following steps.\n 1. Every 1 second, we update VWAP24 data for\
40-
\ every asset pair across all data sources.\n 1. For each asset pair, we also\
41-
\ discard data that is outside the 3 sigma range if there are at least 3 exchanges\
42-
\ for this asset pair.\n 1. From the VWAP24 data, we are creating a tree structure\
43-
\ where node/vertex = asset and edge = rate.\n 1. By traversing the tree structure\
44-
\ using the BFS algorithm and our secret sauce, we are able to establish the final\
45-
\ exchange rates.\n "
22+
\ \r\n\r\nAlgorithm is described below:\r\n\r\n 1. Exchange rates are produced\
23+
\ from quotes, trades, and metadata datasets.\r\n 1. Symbols that are not data_type\
24+
\ = \"SPOT\" are excluded from the calculation.\r\n 1. Symbols from the data\
25+
\ sources that were marked by us as not legitimate are excluded from the calculation.\r\
26+
\n 1. Quotes data where the spread is outside the range of ```<0$; 67%>``` are\
27+
\ discarded. `spreadPrc = (ask - bid) / ((ask + bid) / 2)`\r\n 1. The midpoint\
28+
\ from the quote data is used as a pricing reference and it's weighted by the\
29+
\ passive cumulative volume resting on the best prices.\r\n 1. Volume from the\
30+
\ trades is used to weight the midpoint prices in the VWAP24 algorithm.\r\n 1.\
31+
\ Midpoint data that has not been updated in the last 5 minutes and 1 second is\
32+
\ discarded.\r\n 1. The last 24-hour volume for each symbol is updated every\
33+
\ 4 hours when approximately 20% of the data in the sliding window changes (also,\
34+
\ the list of eligible markets is updated at the same time).\r\n 1. Everywhere\
35+
\ in the algorithm below, we are using asset pairs only from exchanges that have\
36+
\ the highest legitimacy rank, and the rest of the exchanges are discarded. As\
37+
\ we establish the highest-ranking exchanges that have this data for each asset\
38+
\ pair, we ensure that the highest quality data is used for each of them. The\
39+
\ rank used for asset pairing is carried over to the following steps.\r\n 1.\
40+
\ Every 1 second, we update VWAP24 data for every asset pair across all data sources.\r\
41+
\n 1. For each asset pair, we also discard data that is outside the 3 sigma range\
42+
\ if there are at least 3 exchanges for this asset pair.\r\n 1. From the VWAP24\
43+
\ data, we are creating a tree structure where node/vertex = asset and edge =\
44+
\ rate.\r\n 1. By traversing the tree structure using the BFS algorithm and our\
45+
\ secret sauce, we are able to establish the final exchange rates.\r\n "
4646
name: Exchange Rates
47-
- description: |2-
48-
49-
This section describes calls related to order book data, also known as books or passive level 3 data.
47+
- description: "\r\nThis section describes calls related to order book data, also\
48+
\ known as books or passive level 3 data."
5049
name: Order Book L3
51-
- description: |2-
52-
53-
This section describes calls related to order book data, also known as books or passive level 2 data.
54-
55-
:::info
56-
When requesting current data for a specific symbol, output is not encapsulated into JSON array as only one item is returned.
57-
:::
58-
59-
:::info
60-
GET `/v1/orderbooks/current` endpoint is charged one request per 100 data points returned after applying a filter defined by filter_symbol_id parameter. If filter symbols target more than one exchange, error is returned.
61-
:::
62-
63-
:::info
64-
When requesting current order book data limited to a single level, then quotes are actually used. This information is important from the perspective that quotes data could be faster than order book data (behavior is dependent solely one the data source) and they can have the size equal to 0 when the size is unknown. Some data sources publish order books and separately quote data (without the sizes) at a higher frequency. In that case, we will merge the order book feed with quotes feed to make sure that our updates are as fast as possible. The quotes will have the size equal to 0 as the value is unknown and the customer can decide if these higher frequency updates without the sizes are valuable or if not then can discard them or ask for at least 2 order book levels (in case of a REST API call). For the data sources that publish order books only or order books and quotes with the sizes then this will not happen.
65-
:::
50+
- description: "\r\nThis section describes calls related to order book data, also\
51+
\ known as books or passive level 2 data.\r\n\r\n:::info\r\nWhen requesting current\
52+
\ data for a specific symbol, output is not encapsulated into JSON array as only\
53+
\ one item is returned.\r\n:::\r\n\r\n:::info\r\nGET `/v1/orderbooks/current`\
54+
\ endpoint is charged one request per 100 data points returned after applying\
55+
\ a filter defined by filter_symbol_id parameter. If filter symbols target more\
56+
\ than one exchange, error is returned.\r\n:::\r\n\r\n:::info\r\nWhen requesting\
57+
\ current order book data limited to a single level, then quotes are actually\
58+
\ used. This information is important from the perspective that quotes data could\
59+
\ be faster than order book data (behavior is dependent solely one the data source)\
60+
\ and they can have the size equal to 0 when the size is unknown. Some data sources\
61+
\ publish order books and separately quote data (without the sizes) at a higher\
62+
\ frequency. In that case, we will merge the order book feed with quotes feed\
63+
\ to make sure that our updates are as fast as possible. The quotes will have\
64+
\ the size equal to 0 as the value is unknown and the customer can decide if these\
65+
\ higher frequency updates without the sizes are valuable or if not then can discard\
66+
\ them or ask for at least 2 order book levels (in case of a REST API call). For\
67+
\ the data sources that publish order books only or order books and quotes with\
68+
\ the sizes then this will not happen.\r\n:::"
6669
name: Order Book
67-
- description: "\nAPI calls described in this section are related to downloading OHLCV\
68-
\ *(Open, High, Low, Close, Volume)* timeseries data.\nEach data point of this\
69-
\ timeseries represents several indicators calculated from orderbook and transactions\
70-
\ activity inside a time range (period).\n\n:::info\nOHLCV data primary purpose\
71-
\ is to present an overview of the market in human readable form. \nIt's often\
72-
\ used to visualize market data on charts, websites, and various kinds of reports.\n\
73-
:::\n\n:::tip\nCoinAPI expanded the standard OHLCV timeseries by including time\
74-
\ of first and last trade and amount of trades executed inside period.\n:::\n\n\
75-
:::info\nWhile working on the OHLCV data, especially lower time periods, you can\
76-
\ notice that there are cases where there was no transactions and only orderbook\
77-
\ activity.\nIn such cases, the volume_traded and trades_count fields are set\
78-
\ to 0.\nThis is because the OHLCV data is calculated from the orderbook and transactions\
79-
\ activity.\nIf there was no transactions and only orderbook activity, then the\
80-
\ volume_traded and trades_count fields are set to 0.\n:::\n "
70+
- description: "\r\nAPI calls described in this section are related to downloading\
71+
\ OHLCV *(Open, High, Low, Close, Volume)* timeseries data.\r\nEach data point\
72+
\ of this timeseries represents several indicators calculated from orderbook and\
73+
\ transactions activity inside a time range (period).\r\n\r\n:::info\r\nOHLCV\
74+
\ data primary purpose is to present an overview of the market in human readable\
75+
\ form. \r\nIt's often used to visualize market data on charts, websites, and\
76+
\ various kinds of reports.\r\n:::\r\n\r\n:::tip\r\nCoinAPI expanded the standard\
77+
\ OHLCV timeseries by including time of first and last trade and amount of trades\
78+
\ executed inside period.\r\n:::\r\n\r\n:::info\r\nWhile working on the OHLCV\
79+
\ data, especially lower time periods, you can notice that there are cases where\
80+
\ there was no transactions and only orderbook activity.\r\nIn such cases, the\
81+
\ volume_traded and trades_count fields are set to 0.\r\nThis is because the OHLCV\
82+
\ data is calculated from the orderbook and transactions activity.\r\nIf there\
83+
\ was no transactions and only orderbook activity, then the volume_traded and\
84+
\ trades_count fields are set to 0.\r\n:::\r\n "
8185
name: Ohlcv
8286
- description: ""
8387
name: Metadata
@@ -861,7 +865,7 @@ paths:
861865
examples:
862866
Example response:
863867
value:
864-
time: 2025-09-10T06:04:24.6433849Z
868+
time: 2025-09-11T06:04:05.4493607Z
865869
asset_id_base: BTC
866870
asset_id_quote: USD
867871
rate: 10000.0
@@ -871,7 +875,7 @@ paths:
871875
examples:
872876
Example response:
873877
value:
874-
time: 2025-09-10T06:04:24.6433849Z
878+
time: 2025-09-11T06:04:05.4493607Z
875879
asset_id_base: BTC
876880
asset_id_quote: USD
877881
rate: 10000.0
@@ -881,7 +885,7 @@ paths:
881885
examples:
882886
Example response:
883887
value:
884-
time: 2025-09-10T06:04:24.6433849Z
888+
time: 2025-09-11T06:04:05.4493607Z
885889
asset_id_base: BTC
886890
asset_id_quote: USD
887891
rate: 10000.0
@@ -891,7 +895,7 @@ paths:
891895
examples:
892896
Example response:
893897
value:
894-
time: 2025-09-10T06:04:24.6433849Z
898+
time: 2025-09-11T06:04:05.4493607Z
895899
asset_id_base: BTC
896900
asset_id_quote: USD
897901
rate: 10000.0

coinapi/market-data-api-rest/sdk/csharp/src/APIBricks.CoinAPI.MarketDataAPI.REST.V1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ outputDir: out
1111

1212
# https://openapi-generator.tech/docs/generators/csharp
1313
additionalProperties:
14-
packageGuid: '{D8CE7272-D6C0-4828-A0DD-61EBF1386FE0}'
14+
packageGuid: '{DBBF3BCF-E609-4C9E-9F47-831B50235036}'
1515

1616
# https://openapi-generator.tech/docs/integrations/#github-integration
1717
# gitHost:

coinapi/market-data-api-rest/sdk/eiffel/api_client.ecf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
2-
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-21-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-21-0 http://www.eiffel.com/developers/xml/configuration-1-21-0.xsd" name="openapi_eiffel_client" uuid="37f19c88-5a58-459c-b3f8-d5a5e4da8693" library_target="openapi_eiffel_client">
2+
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-21-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-21-0 http://www.eiffel.com/developers/xml/configuration-1-21-0.xsd" name="openapi_eiffel_client" uuid="97479b0c-fcd4-4de1-825e-9bece6336cad" library_target="openapi_eiffel_client">
33
<target name="openapi_eiffel_client">
44
<root all_classes="true"/>
55
<file_rule>

coinapi/market-data-api-rest/sdk/eiffel/test/api_test.ecf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
2-
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-21-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-21-0 http://www.eiffel.com/developers/xml/configuration-1-21-0.xsd" name="test" uuid="f078b400-2481-4c84-b5fe-2a9e71f5fdea">
2+
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-21-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-21-0 http://www.eiffel.com/developers/xml/configuration-1-21-0.xsd" name="test" uuid="768642e2-5e3c-42c3-a90a-ad092d87b680">
33
<target name="test">
44
<root feature="make" class="APPLICATION"/>
55
<file_rule>

0 commit comments

Comments
 (0)