Skip to content

Commit acf0b28

Browse files
committed
Auto-generate SDK for CoinAPI Indexes API REST Historical
1 parent 7a28635 commit acf0b28

File tree

959 files changed

+125400
-41
lines changed

Some content is hidden

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

959 files changed

+125400
-41
lines changed

coinapi/indexes-api-rest/sdk/ada/src/client/-clients.adb

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,281 @@ with Swagger.Streams;
1313
package body .Clients is
1414
pragma Style_Checks ("-bmrIu");
1515

16+
Mime_1 : aliased constant String := "application/x-msgpack";
17+
Mime_2 : aliased constant String := "text/json";
18+
Media_List_1 : constant Swagger.Mime_List := (
19+
1 => Swagger.Mime_Json,
20+
21+
2 => Mime_1'Access,
22+
23+
3 => Mime_2'Access,
24+
25+
4 => Swagger.Mime_Text );
1626

27+
28+
-- Returns all data inputs for a specific index definition
29+
procedure V_1Indexdef_Input_Data_Index_Definition_Id_All_Get
30+
(Client : in out Client_Type;
31+
Index_Definition_Id : in Swagger.UString;
32+
Result : out .Models.IndexesIndexDefinitionInputData_Type_Vectors.Vector) is
33+
URI : Swagger.Clients.URI_Type;
34+
Reply : Swagger.Value_Type;
35+
begin
36+
Client.Set_Accept (Media_List_1);
37+
38+
39+
URI.Set_Path ("/v1/indexdef/input-data/{index_definition_id}/all");
40+
URI.Set_Path_Param ("index_definition_id", Index_Definition_Id);
41+
Client.Call (Swagger.Clients.GET, URI, Reply);
42+
.Models.Deserialize (Reply, "", Result);
43+
end V_1Indexdef_Input_Data_Index_Definition_Id_All_Get;
44+
45+
-- Returns data inputs for certain index definition and time
46+
procedure V_1Indexdef_Input_Data_Index_Definition_Id_Get
47+
(Client : in out Client_Type;
48+
Index_Definition_Id : in Swagger.UString;
49+
Time : in Swagger.Nullable_Date;
50+
Enabled_Only : in Swagger.Nullable_Boolean;
51+
Pending_Only : in Swagger.Nullable_Boolean;
52+
Filter_Asset_Id : in Swagger.Nullable_UString;
53+
With_Status_Info : in Swagger.Nullable_Boolean;
54+
Result : out .Models.IndexesIndexDefinitionSnapshotEntry_Type_Vectors.Vector) is
55+
URI : Swagger.Clients.URI_Type;
56+
Reply : Swagger.Value_Type;
57+
begin
58+
Client.Set_Accept (Media_List_1);
59+
60+
61+
URI.Add_Param ("time", Time);
62+
URI.Add_Param ("time", Time);
63+
URI.Add_Param ("enabled_only", Enabled_Only);
64+
URI.Add_Param ("pending_only", Pending_Only);
65+
URI.Add_Param ("filter_asset_id", Filter_Asset_Id);
66+
URI.Add_Param ("with_status_info", With_Status_Info);
67+
URI.Set_Path ("/v1/indexdef/input-data/{index_definition_id}");
68+
URI.Set_Path_Param ("index_definition_id", Index_Definition_Id);
69+
Client.Call (Swagger.Clients.GET, URI, Reply);
70+
.Models.Deserialize (Reply, "", Result);
71+
end V_1Indexdef_Input_Data_Index_Definition_Id_Get;
72+
73+
-- Get all multi_asset weights
74+
procedure V_1Indexdef_Multiasset_Get
75+
(Client : in out Client_Type;
76+
Result : out .Models.IndexesIndexMultiAssetWeight_Type_Vectors.Vector) is
77+
URI : Swagger.Clients.URI_Type;
78+
Reply : Swagger.Value_Type;
79+
begin
80+
Client.Set_Accept (Media_List_1);
81+
82+
83+
URI.Set_Path ("/v1/indexdef/multiasset");
84+
Client.Call (Swagger.Clients.GET, URI, Reply);
85+
.Models.Deserialize (Reply, "", Result);
86+
end V_1Indexdef_Multiasset_Get;
87+
88+
-- Get multi_asset weights for specific index
89+
procedure V_1Indexdef_Multiasset_Index_Id_Get
90+
(Client : in out Client_Type;
91+
Index_Id : in Swagger.UString;
92+
Result : out .Models.IndexesIndexMultiAssetWeight_Type_Vectors.Vector) is
93+
URI : Swagger.Clients.URI_Type;
94+
Reply : Swagger.Value_Type;
95+
begin
96+
Client.Set_Accept (Media_List_1);
97+
98+
99+
URI.Set_Path ("/v1/indexdef/multiasset/{index_id}");
100+
URI.Set_Path_Param ("index_id", Index_Id);
101+
Client.Call (Swagger.Clients.GET, URI, Reply);
102+
.Models.Deserialize (Reply, "", Result);
103+
end V_1Indexdef_Multiasset_Index_Id_Get;
104+
105+
-- List indexes
106+
procedure V_1Indexes_Get
107+
(Client : in out Client_Type;
108+
Result : out .Models.IndexesIndexIdentifier_Type_Vectors.Vector) is
109+
URI : Swagger.Clients.URI_Type;
110+
Reply : Swagger.Value_Type;
111+
begin
112+
Client.Set_Accept (Media_List_1);
113+
114+
115+
URI.Set_Path ("/v1/indexes");
116+
Client.Call (Swagger.Clients.GET, URI, Reply);
117+
.Models.Deserialize (Reply, "", Result);
118+
end V_1Indexes_Get;
119+
120+
-- Current Index Values for index definition
121+
procedure V_1Indexes_Index_Definition_Id_Current_Snapshot_Get
122+
(Client : in out Client_Type;
123+
Index_Definition_Id : in Swagger.UString;
124+
Result : out .Models.IndexesIndexDefinitionSnapshotEntry_Type_Vectors.Vector) is
125+
URI : Swagger.Clients.URI_Type;
126+
Reply : Swagger.Value_Type;
127+
begin
128+
Client.Set_Accept (Media_List_1);
129+
130+
131+
URI.Set_Path ("/v1/indexes/{index_definition_id}/currentSnapshot");
132+
URI.Set_Path_Param ("index_definition_id", Index_Definition_Id);
133+
Client.Call (Swagger.Clients.GET, URI, Reply);
134+
.Models.Deserialize (Reply, "", Result);
135+
end V_1Indexes_Index_Definition_Id_Current_Snapshot_Get;
136+
137+
-- Historical Index Values for index definition
138+
procedure V_1Indexes_Index_Definition_Id_History_Snapshot_Get
139+
(Client : in out Client_Type;
140+
Index_Definition_Id : in Swagger.UString;
141+
Time : in Swagger.Nullable_Date;
142+
Result : out .Models.IndexesIndexDefinitionSnapshotEntry_Type_Vectors.Vector) is
143+
URI : Swagger.Clients.URI_Type;
144+
Reply : Swagger.Value_Type;
145+
begin
146+
Client.Set_Accept (Media_List_1);
147+
148+
149+
URI.Add_Param ("time", Time);
150+
URI.Add_Param ("time", Time);
151+
URI.Set_Path ("/v1/indexes/{index_definition_id}/historySnapshot");
152+
URI.Set_Path_Param ("index_definition_id", Index_Definition_Id);
153+
Client.Call (Swagger.Clients.GET, URI, Reply);
154+
.Models.Deserialize (Reply, "", Result);
155+
end V_1Indexes_Index_Definition_Id_History_Snapshot_Get;
156+
157+
-- Current Index Value
158+
procedure V_1Indexes_Index_Id_Current_Get
159+
(Client : in out Client_Type;
160+
Index_Id : in Swagger.UString;
161+
Result : out .Models.IndexesIndexValue_Type) is
162+
URI : Swagger.Clients.URI_Type;
163+
Reply : Swagger.Value_Type;
164+
begin
165+
Client.Set_Accept (Media_List_1);
166+
167+
168+
URI.Set_Path ("/v1/indexes/{index_id}/current");
169+
URI.Set_Path_Param ("index_id", Index_Id);
170+
Client.Call (Swagger.Clients.GET, URI, Reply);
171+
.Models.Deserialize (Reply, "", Result);
172+
end V_1Indexes_Index_Id_Current_Get;
173+
174+
-- Historical Index Value w/Composition
175+
procedure V_1Indexes_Index_Id_History_Get
176+
(Client : in out Client_Type;
177+
Index_Id : in Swagger.UString;
178+
Time_Start : in Swagger.Nullable_Date;
179+
Time_End : in Swagger.Nullable_Date;
180+
Limit : in Swagger.Nullable_Integer;
181+
Result : out .Models.IndexesIndexValue_Type_Vectors.Vector) is
182+
URI : Swagger.Clients.URI_Type;
183+
Reply : Swagger.Value_Type;
184+
begin
185+
Client.Set_Accept (Media_List_1);
186+
187+
188+
URI.Add_Param ("time_start", Time_Start);
189+
URI.Add_Param ("time_start", Time_Start);
190+
URI.Add_Param ("time_end", Time_End);
191+
URI.Add_Param ("time_end", Time_End);
192+
URI.Add_Param ("limit", Limit);
193+
URI.Set_Path ("/v1/indexes/{index_id}/history");
194+
URI.Set_Path_Param ("index_id", Index_Id);
195+
Client.Call (Swagger.Clients.GET, URI, Reply);
196+
.Models.Deserialize (Reply, "", Result);
197+
end V_1Indexes_Index_Id_History_Get;
198+
199+
-- Timeseries Index Value
200+
procedure V_1Indexes_Index_Id_Timeseries_Get
201+
(Client : in out Client_Type;
202+
Index_Id : in Swagger.UString;
203+
Period_Id : in Swagger.UString;
204+
Time_Start : in Swagger.UString;
205+
Time_End : in Swagger.UString;
206+
Limit : in Swagger.Nullable_Integer;
207+
Result : out .Models.IndexesIndexTimeseriesItem_Type_Vectors.Vector) is
208+
URI : Swagger.Clients.URI_Type;
209+
Reply : Swagger.Value_Type;
210+
begin
211+
Client.Set_Accept (Media_List_1);
212+
213+
214+
URI.Add_Param ("period_id", Period_Id);
215+
URI.Add_Param ("time_start", Time_Start);
216+
URI.Add_Param ("time_end", Time_End);
217+
URI.Add_Param ("limit", Limit);
218+
URI.Set_Path ("/v1/indexes/{index_id}/timeseries");
219+
URI.Set_Path_Param ("index_id", Index_Id);
220+
Client.Call (Swagger.Clients.GET, URI, Reply);
221+
.Models.Deserialize (Reply, "", Result);
222+
end V_1Indexes_Index_Id_Timeseries_Get;
223+
224+
-- List all exchanges by exchange_id
225+
procedure Api_Metadata_Exchanges_Exchange_Id_Get
226+
(Client : in out Client_Type;
227+
Exchange_Id : in Swagger.UString;
228+
Result : out .Models.MetadataExchange_Type_Vectors.Vector) is
229+
URI : Swagger.Clients.URI_Type;
230+
Reply : Swagger.Value_Type;
231+
begin
232+
Client.Set_Accept (Media_List_1);
233+
234+
235+
URI.Set_Path ("/api/metadata/exchanges/{exchange_id}");
236+
URI.Set_Path_Param ("exchange_id", Exchange_Id);
237+
Client.Call (Swagger.Clients.GET, URI, Reply);
238+
.Models.Deserialize (Reply, "", Result);
239+
end Api_Metadata_Exchanges_Exchange_Id_Get;
240+
241+
-- List all exchanges
242+
-- Get a detailed list of exchanges provided by the system.
243+
--
244+
-- :::info
245+
-- Properties of the output are providing aggregated information from across all symbols related to the specific exchange. 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.
246+
-- :::
247+
procedure Api_Metadata_Exchanges_Get
248+
(Client : in out Client_Type;
249+
Filter_Exchange_Id : in Swagger.Nullable_UString;
250+
Result : out .Models.MetadataExchange_Type_Vectors.Vector) is
251+
URI : Swagger.Clients.URI_Type;
252+
Reply : Swagger.Value_Type;
253+
begin
254+
Client.Set_Accept (Media_List_1);
255+
256+
257+
URI.Add_Param ("filter_exchange_id", Filter_Exchange_Id);
258+
URI.Set_Path ("/api/metadata/exchanges");
259+
Client.Call (Swagger.Clients.GET, URI, Reply);
260+
.Models.Deserialize (Reply, "", Result);
261+
end Api_Metadata_Exchanges_Get;
262+
263+
-- List all periods
264+
-- Get full list of supported time periods
265+
--
266+
-- ### Available periods
267+
--
268+
-- Time unit | Period identifiers
269+
-- --------- | -----------
270+
-- Second | 1SEC, 2SEC, 3SEC, 4SEC, 5SEC, 6SEC, 10SEC, 15SEC, 20SEC, 30SEC
271+
-- Minute | 1MIN, 2MIN, 3MIN, 4MIN, 5MIN, 6MIN, 10MIN, 15MIN, 20MIN, 30MIN
272+
-- Hour | 1HRS, 2HRS, 3HRS, 4HRS, 6HRS, 8HRS, 12HRS
273+
-- Day | 1DAY, 2DAY, 3DAY, 5DAY, 7DAY, 10DAY
274+
-- Month | 1MTH, 2MTH, 3MTH, 4MTH, 6MTH
275+
-- Year | 1YRS, 2YRS, 3YRS, 4YRS, 5YRS
276+
--
277+
-- :::tip
278+
-- You can assume that we will not remove any periods from this response, however, we may add new ones.
279+
-- :::
280+
procedure V_1Metadata_Periods_Get
281+
(Client : in out Client_Type;
282+
Result : out .Models.MetadataTimeseriesPeriod_Type_Vectors.Vector) is
283+
URI : Swagger.Clients.URI_Type;
284+
Reply : Swagger.Value_Type;
285+
begin
286+
Client.Set_Accept (Media_List_1);
287+
288+
289+
URI.Set_Path ("/v1/metadata/periods");
290+
Client.Call (Swagger.Clients.GET, URI, Reply);
291+
.Models.Deserialize (Reply, "", Result);
292+
end V_1Metadata_Periods_Get;
17293
end .Clients;

coinapi/indexes-api-rest/sdk/ada/src/client/-clients.ads

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,113 @@ package .Clients is
1515

1616
type Client_Type is new Swagger.Clients.Client_Type with null record;
1717

18+
-- Returns all data inputs for a specific index definition
19+
procedure V_1Indexdef_Input_Data_Index_Definition_Id_All_Get
20+
(Client : in out Client_Type;
21+
Index_Definition_Id : in Swagger.UString;
22+
Result : out .Models.IndexesIndexDefinitionInputData_Type_Vectors.Vector);
23+
24+
-- Returns data inputs for certain index definition and time
25+
procedure V_1Indexdef_Input_Data_Index_Definition_Id_Get
26+
(Client : in out Client_Type;
27+
Index_Definition_Id : in Swagger.UString;
28+
Time : in Swagger.Nullable_Date;
29+
Enabled_Only : in Swagger.Nullable_Boolean;
30+
Pending_Only : in Swagger.Nullable_Boolean;
31+
Filter_Asset_Id : in Swagger.Nullable_UString;
32+
With_Status_Info : in Swagger.Nullable_Boolean;
33+
Result : out .Models.IndexesIndexDefinitionSnapshotEntry_Type_Vectors.Vector);
34+
35+
-- Get all multi_asset weights
36+
procedure V_1Indexdef_Multiasset_Get
37+
(Client : in out Client_Type;
38+
Result : out .Models.IndexesIndexMultiAssetWeight_Type_Vectors.Vector);
39+
40+
-- Get multi_asset weights for specific index
41+
procedure V_1Indexdef_Multiasset_Index_Id_Get
42+
(Client : in out Client_Type;
43+
Index_Id : in Swagger.UString;
44+
Result : out .Models.IndexesIndexMultiAssetWeight_Type_Vectors.Vector);
45+
46+
-- List indexes
47+
procedure V_1Indexes_Get
48+
(Client : in out Client_Type;
49+
Result : out .Models.IndexesIndexIdentifier_Type_Vectors.Vector);
50+
51+
-- Current Index Values for index definition
52+
procedure V_1Indexes_Index_Definition_Id_Current_Snapshot_Get
53+
(Client : in out Client_Type;
54+
Index_Definition_Id : in Swagger.UString;
55+
Result : out .Models.IndexesIndexDefinitionSnapshotEntry_Type_Vectors.Vector);
56+
57+
-- Historical Index Values for index definition
58+
procedure V_1Indexes_Index_Definition_Id_History_Snapshot_Get
59+
(Client : in out Client_Type;
60+
Index_Definition_Id : in Swagger.UString;
61+
Time : in Swagger.Nullable_Date;
62+
Result : out .Models.IndexesIndexDefinitionSnapshotEntry_Type_Vectors.Vector);
63+
64+
-- Current Index Value
65+
procedure V_1Indexes_Index_Id_Current_Get
66+
(Client : in out Client_Type;
67+
Index_Id : in Swagger.UString;
68+
Result : out .Models.IndexesIndexValue_Type);
69+
70+
-- Historical Index Value w/Composition
71+
procedure V_1Indexes_Index_Id_History_Get
72+
(Client : in out Client_Type;
73+
Index_Id : in Swagger.UString;
74+
Time_Start : in Swagger.Nullable_Date;
75+
Time_End : in Swagger.Nullable_Date;
76+
Limit : in Swagger.Nullable_Integer;
77+
Result : out .Models.IndexesIndexValue_Type_Vectors.Vector);
78+
79+
-- Timeseries Index Value
80+
procedure V_1Indexes_Index_Id_Timeseries_Get
81+
(Client : in out Client_Type;
82+
Index_Id : in Swagger.UString;
83+
Period_Id : in Swagger.UString;
84+
Time_Start : in Swagger.UString;
85+
Time_End : in Swagger.UString;
86+
Limit : in Swagger.Nullable_Integer;
87+
Result : out .Models.IndexesIndexTimeseriesItem_Type_Vectors.Vector);
88+
89+
-- List all exchanges by exchange_id
90+
procedure Api_Metadata_Exchanges_Exchange_Id_Get
91+
(Client : in out Client_Type;
92+
Exchange_Id : in Swagger.UString;
93+
Result : out .Models.MetadataExchange_Type_Vectors.Vector);
94+
95+
-- List all exchanges
96+
-- Get a detailed list of exchanges provided by the system.
97+
--
98+
-- :::info
99+
-- Properties of the output are providing aggregated information from across all symbols related to the specific exchange. 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.
100+
-- :::
101+
procedure Api_Metadata_Exchanges_Get
102+
(Client : in out Client_Type;
103+
Filter_Exchange_Id : in Swagger.Nullable_UString;
104+
Result : out .Models.MetadataExchange_Type_Vectors.Vector);
105+
106+
-- List all periods
107+
-- Get full list of supported time periods
108+
--
109+
-- ### Available periods
110+
--
111+
-- Time unit | Period identifiers
112+
-- --------- | -----------
113+
-- Second | 1SEC, 2SEC, 3SEC, 4SEC, 5SEC, 6SEC, 10SEC, 15SEC, 20SEC, 30SEC
114+
-- Minute | 1MIN, 2MIN, 3MIN, 4MIN, 5MIN, 6MIN, 10MIN, 15MIN, 20MIN, 30MIN
115+
-- Hour | 1HRS, 2HRS, 3HRS, 4HRS, 6HRS, 8HRS, 12HRS
116+
-- Day | 1DAY, 2DAY, 3DAY, 5DAY, 7DAY, 10DAY
117+
-- Month | 1MTH, 2MTH, 3MTH, 4MTH, 6MTH
118+
-- Year | 1YRS, 2YRS, 3YRS, 4YRS, 5YRS
119+
--
120+
-- :::tip
121+
-- You can assume that we will not remove any periods from this response, however, we may add new ones.
122+
-- :::
123+
procedure V_1Metadata_Periods_Get
124+
(Client : in out Client_Type;
125+
Result : out .Models.MetadataTimeseriesPeriod_Type_Vectors.Vector);
126+
18127
end .Clients;

0 commit comments

Comments
 (0)