@apteva/integrations 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/package.json +1 -1
  2. package/src/apps/activecampaign.json +209 -0
  3. package/src/apps/activecollab.json +417 -0
  4. package/src/apps/airtable.json +235 -0
  5. package/src/apps/alpaca-trading.json +1554 -0
  6. package/src/apps/amadeus.json +225 -0
  7. package/src/apps/anthropic-api.json +96 -0
  8. package/src/apps/apify.json +203 -0
  9. package/src/apps/apollo.json +748 -0
  10. package/src/apps/apple-podcasts.json +116 -0
  11. package/src/apps/archive-api.json +104 -0
  12. package/src/apps/archive.json +151 -0
  13. package/src/apps/arduino-cloud.json +301 -0
  14. package/src/apps/arest.json +492 -0
  15. package/src/apps/asana.json +184 -0
  16. package/src/apps/ashby.json +176 -0
  17. package/src/apps/assemblyai.json +163 -0
  18. package/src/apps/attio.json +243 -0
  19. package/src/apps/aws-cloudfront.json +132 -0
  20. package/src/apps/aws-dynamodb.json +295 -0
  21. package/src/apps/aws-ec2.json +184 -0
  22. package/src/apps/aws-lambda.json +361 -0
  23. package/src/apps/aws-route53.json +110 -0
  24. package/src/apps/aws-s3.json +303 -0
  25. package/src/apps/aws-ses.json +556 -0
  26. package/src/apps/aws-sns.json +217 -0
  27. package/src/apps/aws-sqs.json +234 -0
  28. package/src/apps/axiom.json +123 -0
  29. package/src/apps/beehiiv.json +252 -0
  30. package/src/apps/binance-trading.json +555 -0
  31. package/src/apps/bitly.json +175 -0
  32. package/src/apps/bloobirds.json +246 -0
  33. package/src/apps/bluesky.json +201 -0
  34. package/src/apps/blynk.json +316 -0
  35. package/src/apps/booking-com.json +144 -0
  36. package/src/apps/box.json +289 -0
  37. package/src/apps/brevo.json +1423 -0
  38. package/src/apps/browse-ai.json +148 -0
  39. package/src/apps/bunny-cdn.json +330 -0
  40. package/src/apps/bunny-stream.json +387 -0
  41. package/src/apps/cal-com.json +240 -0
  42. package/src/apps/calendly.json +578 -0
  43. package/src/apps/calflow-calendar.json +706 -0
  44. package/src/apps/callrail.json +190 -0
  45. package/src/apps/canva.json +197 -0
  46. package/src/apps/cartesia.json +201 -0
  47. package/src/apps/castbase.json +753 -0
  48. package/src/apps/chargebee.json +226 -0
  49. package/src/apps/cleanster.json +359 -0
  50. package/src/apps/clicksend.json +278 -0
  51. package/src/apps/clickup.json +266 -0
  52. package/src/apps/clipkit.json +517 -0
  53. package/src/apps/close.json +359 -0
  54. package/src/apps/cloudflare.json +329 -0
  55. package/src/apps/cloudinary.json +164 -0
  56. package/src/apps/coda.json +288 -0
  57. package/src/apps/cohere.json +158 -0
  58. package/src/apps/coinbase.json +268 -0
  59. package/src/apps/composio.json +146 -0
  60. package/src/apps/confluence.json +270 -0
  61. package/src/apps/consensus.json +879 -0
  62. package/src/apps/contabo.json +733 -0
  63. package/src/apps/convertkit.json +211 -0
  64. package/src/apps/core-image.json +426 -0
  65. package/src/apps/core-video.json +1246 -0
  66. package/src/apps/craftcloud.json +298 -0
  67. package/src/apps/datadog.json +401 -0
  68. package/src/apps/dataforseo.json +1273 -0
  69. package/src/apps/deepseek.json +150 -0
  70. package/src/apps/dialpad.json +229 -0
  71. package/src/apps/discord.json +239 -0
  72. package/src/apps/dnsimple.json +405 -0
  73. package/src/apps/docusign.json +214 -0
  74. package/src/apps/docx.json +282 -0
  75. package/src/apps/dropbox.json +185 -0
  76. package/src/apps/duffel.json +231 -0
  77. package/src/apps/dux-soup.json +694 -0
  78. package/src/apps/dynadot.json +250 -0
  79. package/src/apps/elevenlabs.json +327 -0
  80. package/src/apps/eventbrite-events.json +598 -0
  81. package/src/apps/facebook-ads.json +1399 -0
  82. package/src/apps/facebook-api.json +282 -0
  83. package/src/apps/fal-ai.json +400 -0
  84. package/src/apps/fathom.json +86 -0
  85. package/src/apps/figma.json +162 -0
  86. package/src/apps/filestack.json +159 -0
  87. package/src/apps/firebase.json +271 -0
  88. package/src/apps/firecrawl.json +278 -0
  89. package/src/apps/folk.json +564 -0
  90. package/src/apps/forecast-app.json +377 -0
  91. package/src/apps/freshdesk.json +283 -0
  92. package/src/apps/gemini.json +528 -0
  93. package/src/apps/ghost.json +439 -0
  94. package/src/apps/gigs-marketplace.json +1442 -0
  95. package/src/apps/github.json +1479 -47
  96. package/src/apps/gitlab.json +448 -0
  97. package/src/apps/gmail.json +839 -28
  98. package/src/apps/gohighlevel.json +596 -0
  99. package/src/apps/google-ads.json +270 -0
  100. package/src/apps/google-calendar.json +996 -36
  101. package/src/apps/google-docs.json +278 -0
  102. package/src/apps/google-drive.json +360 -0
  103. package/src/apps/google-maps.json +473 -0
  104. package/src/apps/google-sheets.json +330 -0
  105. package/src/apps/gooten.json +411 -0
  106. package/src/apps/gravity-forms.json +385 -0
  107. package/src/apps/gusto.json +171 -0
  108. package/src/apps/hackernews.json +221 -0
  109. package/src/apps/harmonic.json +86 -0
  110. package/src/apps/helpscout.json +664 -0
  111. package/src/apps/hetzner.json +658 -0
  112. package/src/apps/heygen.json +184 -0
  113. package/src/apps/heyreach.json +388 -0
  114. package/src/apps/hospitable.json +340 -0
  115. package/src/apps/hostinger.json +374 -0
  116. package/src/apps/hubspot.json +682 -0
  117. package/src/apps/huggingface.json +97 -0
  118. package/src/apps/hunter.json +504 -0
  119. package/src/apps/ig-trading.json +849 -0
  120. package/src/apps/imaterialise.json +349 -0
  121. package/src/apps/instagram-api.json +538 -0
  122. package/src/apps/intercom.json +648 -0
  123. package/src/apps/jira.json +226 -0
  124. package/src/apps/klaviyo.json +199 -0
  125. package/src/apps/kling-ai.json +206 -0
  126. package/src/apps/kraken.json +870 -0
  127. package/src/apps/late.json +1056 -0
  128. package/src/apps/leadpages.json +243 -0
  129. package/src/apps/learning-platform.json +2244 -0
  130. package/src/apps/linear.json +184 -57
  131. package/src/apps/linkedin.json +179 -0
  132. package/src/apps/listen-notes.json +136 -0
  133. package/src/apps/lnk-bio.json +125 -0
  134. package/src/apps/loom.json +188 -0
  135. package/src/apps/luma.json +280 -0
  136. package/src/apps/mailchimp.json +238 -0
  137. package/src/apps/mailgun.json +310 -0
  138. package/src/apps/manychat.json +312 -0
  139. package/src/apps/marin-software.json +843 -0
  140. package/src/apps/media-downloader.json +157 -0
  141. package/src/apps/meetup-events.json +361 -0
  142. package/src/apps/meshy.json +248 -0
  143. package/src/apps/microsoft-teams.json +162 -0
  144. package/src/apps/monday.json +213 -0
  145. package/src/apps/mongodb-atlas.json +467 -0
  146. package/src/apps/namecheap.json +252 -0
  147. package/src/apps/nexar.json +289 -0
  148. package/src/apps/notion.json +530 -50
  149. package/src/apps/omnikit-analytics.json +374 -0
  150. package/src/apps/omnikit-api-gateway.json +660 -0
  151. package/src/apps/omnikit-billing.json +1781 -0
  152. package/src/apps/omnikit-cms.json +899 -0
  153. package/src/apps/omnikit-functions.json +329 -0
  154. package/src/apps/omnikit-intelligence.json +650 -0
  155. package/src/apps/omnikit-management.json +214 -0
  156. package/src/apps/omnikit-media.json +646 -0
  157. package/src/apps/omnikit-messaging.json +1826 -0
  158. package/src/apps/omnikit-redirects.json +209 -0
  159. package/src/apps/omnikit-webhooks.json +269 -0
  160. package/src/apps/omnikit-workflows.json +323 -0
  161. package/src/apps/openai-api.json +462 -0
  162. package/src/apps/openmeteo-weather.json +75 -0
  163. package/src/apps/optinmonster.json +244 -0
  164. package/src/apps/paidkit.json +1218 -0
  165. package/src/apps/paypal.json +254 -0
  166. package/src/apps/pdf.json +366 -0
  167. package/src/apps/pipedrive.json +255 -0
  168. package/src/apps/polymarket.json +653 -0
  169. package/src/apps/porkbun.json +417 -0
  170. package/src/apps/portfolio.json +501 -0
  171. package/src/apps/postmark.json +257 -0
  172. package/src/apps/printful.json +273 -0
  173. package/src/apps/printify.json +295 -0
  174. package/src/apps/producthunt.json +346 -0
  175. package/src/apps/pushover-notifications.json +113 -0
  176. package/src/apps/qonto.json +366 -0
  177. package/src/apps/quickbooks.json +234 -0
  178. package/src/apps/replicate.json +106 -0
  179. package/src/apps/rss.json +281 -0
  180. package/src/apps/salesflow.json +538 -0
  181. package/src/apps/salesforce-crm.json +216 -0
  182. package/src/apps/sap.json +256 -0
  183. package/src/apps/scaleway.json +911 -0
  184. package/src/apps/sculpteo.json +234 -0
  185. package/src/apps/sendgrid-email.json +233 -0
  186. package/src/apps/sendgrid.json +160 -35
  187. package/src/apps/shapeways.json +188 -0
  188. package/src/apps/shopify.json +1217 -0
  189. package/src/apps/skai.json +779 -0
  190. package/src/apps/slack.json +228 -38
  191. package/src/apps/slant3d.json +231 -0
  192. package/src/apps/slides.json +760 -0
  193. package/src/apps/smartly.json +504 -0
  194. package/src/apps/snov.json +467 -0
  195. package/src/apps/socialcast.json +553 -63
  196. package/src/apps/square.json +274 -0
  197. package/src/apps/storage-management.json +788 -0
  198. package/src/apps/storylane.json +180 -0
  199. package/src/apps/strapi.json +338 -0
  200. package/src/apps/stripe-payments.json +847 -0
  201. package/src/apps/stripe.json +472 -35
  202. package/src/apps/supabase.json +169 -0
  203. package/src/apps/supademo.json +115 -0
  204. package/src/apps/taskflow.json +714 -0
  205. package/src/apps/teamwork.json +457 -0
  206. package/src/apps/telegram.json +444 -0
  207. package/src/apps/thinger.json +458 -0
  208. package/src/apps/ticktick.json +169 -0
  209. package/src/apps/tiktok-api.json +406 -0
  210. package/src/apps/todoist.json +151 -0
  211. package/src/apps/together.json +123 -0
  212. package/src/apps/torrent.json +267 -0
  213. package/src/apps/trading.json +1012 -0
  214. package/src/apps/trading212.json +383 -0
  215. package/src/apps/trello.json +205 -0
  216. package/src/apps/tripo.json +157 -0
  217. package/src/apps/twilio.json +1008 -0
  218. package/src/apps/twitter-ads.json +875 -0
  219. package/src/apps/twitter-api.json +1151 -0
  220. package/src/apps/twitterapiio.json +548 -0
  221. package/src/apps/typeform.json +210 -0
  222. package/src/apps/vidforge.json +1020 -0
  223. package/src/apps/vonage.json +394 -0
  224. package/src/apps/vultr.json +225 -0
  225. package/src/apps/webflow.json +223 -0
  226. package/src/apps/wise.json +273 -0
  227. package/src/apps/wistia.json +283 -0
  228. package/src/apps/woocommerce.json +288 -0
  229. package/src/apps/wordpress.json +1675 -0
  230. package/src/apps/xero.json +257 -0
  231. package/src/apps/youtube-api.json +861 -0
  232. package/src/apps/zendesk.json +295 -0
  233. package/src/apps/zite.json +173 -0
  234. package/src/apps/zoho-crm.json +386 -0
  235. package/src/apps/zoo.json +193 -0
  236. package/src/apps/zoom.json +334 -0
@@ -0,0 +1,1012 @@
1
+ {
2
+ "slug": "trading",
3
+ "name": "Trading & Portfolio Management",
4
+ "description": "Portfolio and trading management system with AI agent backtesting - track assets, portfolios, holdings, orders, transactions, and test strategies on historical data",
5
+ "logo": "https://www.google.com/s2/favicons?domain=omnikit.co&sz=128",
6
+ "categories": [
7
+ "trading",
8
+ "portfolio",
9
+ "assets",
10
+ "holdings",
11
+ "orders",
12
+ "transactions",
13
+ "market-data",
14
+ "backtesting",
15
+ "ai-agent"
16
+ ],
17
+ "base_url": "",
18
+ "auth": {
19
+ "types": [
20
+ "bearer"
21
+ ],
22
+ "headers": {
23
+ "Authorization": "Bearer {{token}}"
24
+ },
25
+ "credential_fields": [
26
+ {
27
+ "name": "token",
28
+ "label": "API Key"
29
+ }
30
+ ]
31
+ },
32
+ "tools": [
33
+ {
34
+ "name": "get_asset",
35
+ "description": "Get comprehensive asset data with automatic live price fetching from exchanges (Alpaca/Binance)",
36
+ "method": "GET",
37
+ "path": "/get-asset",
38
+ "input_schema": {
39
+ "type": "object",
40
+ "properties": {
41
+ "asset_id": {
42
+ "type": "string",
43
+ "description": "Asset ID or symbol (e.g., AAPL, BTC)"
44
+ },
45
+ "as_of_date": {
46
+ "type": "string",
47
+ "description": "Get price as of a specific date (YYYY-MM-DD). Use this for backtesting or historical queries. Example: 2025-01-05 for January 5th.",
48
+ "format": "date"
49
+ },
50
+ "include_prices": {
51
+ "type": "boolean",
52
+ "description": "Include price history",
53
+ "default": true
54
+ },
55
+ "include_fundamentals": {
56
+ "type": "boolean",
57
+ "description": "Include fundamental data",
58
+ "default": true
59
+ },
60
+ "include_dividends": {
61
+ "type": "boolean",
62
+ "description": "Include dividend history",
63
+ "default": true
64
+ },
65
+ "auto_fetch": {
66
+ "type": "boolean",
67
+ "description": "Auto-fetch prices if missing (historical if as_of_date set, current otherwise)",
68
+ "default": true
69
+ },
70
+ "max_age_minutes": {
71
+ "type": "number",
72
+ "description": "Consider prices older than this many minutes as stale (ignored for historical queries)",
73
+ "default": 5
74
+ },
75
+ "force_refresh": {
76
+ "type": "boolean",
77
+ "description": "Force refresh from exchange, bypass cache",
78
+ "default": false
79
+ },
80
+ "interval": {
81
+ "type": "string",
82
+ "description": "Price data interval (default: 1d)",
83
+ "enum": [
84
+ "1m",
85
+ "5m",
86
+ "15m",
87
+ "1h",
88
+ "1d",
89
+ "1wk",
90
+ "1mo"
91
+ ],
92
+ "default": "1d"
93
+ },
94
+ "asset_type": {
95
+ "type": "string",
96
+ "description": "Asset type: stock (default) or crypto/cryptocurrency",
97
+ "enum": [
98
+ "stock",
99
+ "crypto"
100
+ ],
101
+ "default": "stock"
102
+ }
103
+ },
104
+ "required": [
105
+ "asset_id"
106
+ ]
107
+ }
108
+ },
109
+ {
110
+ "name": "get_historical_prices",
111
+ "description": "Get historical OHLCV price data for stocks or crypto. Auto-fetches from Yahoo Finance (stocks) or Binance (crypto) if not cached in database.",
112
+ "method": "GET",
113
+ "path": "/get-historical-prices",
114
+ "input_schema": {
115
+ "type": "object",
116
+ "properties": {
117
+ "symbol": {
118
+ "type": "string",
119
+ "description": "Stock or crypto symbol (e.g., AAPL, MSFT, BTC, ETH)"
120
+ },
121
+ "start_date": {
122
+ "type": "string",
123
+ "description": "Start date (YYYY-MM-DD). For a single day, set start_date and end_date to the same date. Defaults to 30 days ago.",
124
+ "format": "date"
125
+ },
126
+ "end_date": {
127
+ "type": "string",
128
+ "description": "End date (YYYY-MM-DD). For a single day, set start_date and end_date to the same date. Defaults to today.",
129
+ "format": "date"
130
+ },
131
+ "interval": {
132
+ "type": "string",
133
+ "description": "Data interval",
134
+ "enum": [
135
+ "1m",
136
+ "5m",
137
+ "15m",
138
+ "1h",
139
+ "1d",
140
+ "1wk",
141
+ "1mo"
142
+ ],
143
+ "default": "1d"
144
+ },
145
+ "asset_type": {
146
+ "type": "string",
147
+ "description": "Asset type: stock (default) or crypto",
148
+ "enum": [
149
+ "stock",
150
+ "crypto"
151
+ ],
152
+ "default": "stock"
153
+ },
154
+ "force_refresh": {
155
+ "type": "boolean",
156
+ "description": "Force fetch from source even if cached",
157
+ "default": false
158
+ }
159
+ },
160
+ "required": [
161
+ "symbol"
162
+ ]
163
+ }
164
+ },
165
+ {
166
+ "name": "list_assets",
167
+ "description": "List all available assets with filtering and pagination",
168
+ "method": "GET",
169
+ "path": "/list-assets",
170
+ "input_schema": {
171
+ "type": "object",
172
+ "properties": {
173
+ "asset_type": {
174
+ "type": "string",
175
+ "description": "Filter by asset type (stock, crypto, etf, etc.)"
176
+ },
177
+ "exchange": {
178
+ "type": "string",
179
+ "description": "Filter by exchange"
180
+ },
181
+ "limit": {
182
+ "type": "integer",
183
+ "description": "Maximum results to return",
184
+ "default": 100,
185
+ "maximum": 1000
186
+ },
187
+ "offset": {
188
+ "type": "integer",
189
+ "description": "Results offset for pagination",
190
+ "default": 0
191
+ },
192
+ "sort": {
193
+ "type": "string",
194
+ "description": "Sort order (e.g., symbol:asc, name:desc)",
195
+ "default": "symbol:asc"
196
+ }
197
+ }
198
+ }
199
+ },
200
+ {
201
+ "name": "search_assets",
202
+ "description": "Search assets by symbol or name with fuzzy matching",
203
+ "method": "GET",
204
+ "path": "/search-assets",
205
+ "input_schema": {
206
+ "type": "object",
207
+ "properties": {
208
+ "query": {
209
+ "type": "string",
210
+ "description": "Search query (symbol or name)"
211
+ },
212
+ "asset_type": {
213
+ "type": "string",
214
+ "description": "Filter by asset type"
215
+ },
216
+ "exchange": {
217
+ "type": "string",
218
+ "description": "Filter by exchange"
219
+ },
220
+ "limit": {
221
+ "type": "integer",
222
+ "description": "Maximum results",
223
+ "default": 20,
224
+ "maximum": 100
225
+ }
226
+ },
227
+ "required": [
228
+ "query"
229
+ ]
230
+ }
231
+ },
232
+ {
233
+ "name": "create_portfolio",
234
+ "description": "Create a new investment portfolio for a user",
235
+ "method": "POST",
236
+ "path": "/create-portfolio",
237
+ "input_schema": {
238
+ "type": "object",
239
+ "properties": {
240
+ "user_id": {
241
+ "type": "string",
242
+ "description": "User ID who owns the portfolio"
243
+ },
244
+ "name": {
245
+ "type": "string",
246
+ "description": "Portfolio name"
247
+ },
248
+ "description": {
249
+ "type": "string",
250
+ "description": "Portfolio description"
251
+ },
252
+ "currency": {
253
+ "type": "string",
254
+ "description": "Base currency for the portfolio",
255
+ "default": "USD"
256
+ },
257
+ "is_default": {
258
+ "type": "boolean",
259
+ "description": "Whether this is the default portfolio",
260
+ "default": false
261
+ }
262
+ },
263
+ "required": [
264
+ "user_id",
265
+ "name"
266
+ ]
267
+ }
268
+ },
269
+ {
270
+ "name": "list_portfolios",
271
+ "description": "List all portfolios for a user with optional valuation data",
272
+ "method": "GET",
273
+ "path": "/list-portfolios",
274
+ "input_schema": {
275
+ "type": "object",
276
+ "properties": {
277
+ "user_id": {
278
+ "type": "string",
279
+ "description": "User ID to list portfolios for"
280
+ },
281
+ "include_valuations": {
282
+ "type": "boolean",
283
+ "description": "Include latest valuation data",
284
+ "default": false
285
+ }
286
+ },
287
+ "required": [
288
+ "user_id"
289
+ ]
290
+ }
291
+ },
292
+ {
293
+ "name": "get_portfolio_summary",
294
+ "description": "Get portfolio value, performance, and allocation summary",
295
+ "method": "GET",
296
+ "path": "/get-portfolio-summary",
297
+ "input_schema": {
298
+ "type": "object",
299
+ "properties": {
300
+ "portfolio_id": {
301
+ "type": "string",
302
+ "description": "Portfolio ID"
303
+ },
304
+ "as_of_date": {
305
+ "type": "string",
306
+ "description": "Date for summary (defaults to today, format: YYYY-MM-DD)"
307
+ }
308
+ },
309
+ "required": [
310
+ "portfolio_id"
311
+ ]
312
+ }
313
+ },
314
+ {
315
+ "name": "get_holdings",
316
+ "description": "Get current holdings for a portfolio with market values. For backtests, use as_of_date to get prices as of the simulation date.",
317
+ "method": "GET",
318
+ "path": "/get-holdings",
319
+ "input_schema": {
320
+ "type": "object",
321
+ "properties": {
322
+ "portfolio_id": {
323
+ "type": "string",
324
+ "description": "Portfolio ID"
325
+ },
326
+ "asset_type": {
327
+ "type": "string",
328
+ "description": "Filter by asset type"
329
+ },
330
+ "include_zero_balance": {
331
+ "type": "boolean",
332
+ "description": "Include assets with zero balance",
333
+ "default": false
334
+ },
335
+ "as_of_date": {
336
+ "type": "string",
337
+ "description": "Get holdings valued as of this date (YYYY-MM-DD). IMPORTANT for backtests to get correct historical prices.",
338
+ "format": "date"
339
+ }
340
+ },
341
+ "required": [
342
+ "portfolio_id"
343
+ ]
344
+ }
345
+ },
346
+ {
347
+ "name": "record_transaction",
348
+ "description": "Manually record a buy/sell/transfer transaction and update holdings",
349
+ "method": "GET",
350
+ "path": "/record-transaction",
351
+ "input_schema": {
352
+ "type": "object",
353
+ "properties": {
354
+ "portfolio_id": {
355
+ "type": "string",
356
+ "description": "Portfolio ID"
357
+ },
358
+ "asset_id": {
359
+ "type": "string",
360
+ "description": "Asset ID"
361
+ },
362
+ "transaction_type": {
363
+ "type": "string",
364
+ "description": "Transaction type",
365
+ "enum": [
366
+ "buy",
367
+ "sell",
368
+ "transfer_in",
369
+ "transfer_out",
370
+ "dividend",
371
+ "split",
372
+ "fee"
373
+ ]
374
+ },
375
+ "quantity": {
376
+ "type": "number",
377
+ "description": "Quantity of assets"
378
+ },
379
+ "price_per_unit": {
380
+ "type": "number",
381
+ "description": "Price per unit"
382
+ },
383
+ "fees": {
384
+ "type": "number",
385
+ "description": "Transaction fees",
386
+ "default": 0
387
+ },
388
+ "taxes": {
389
+ "type": "number",
390
+ "description": "Transaction taxes",
391
+ "default": 0
392
+ },
393
+ "transaction_date": {
394
+ "type": "string",
395
+ "description": "Transaction date (ISO format)"
396
+ },
397
+ "notes": {
398
+ "type": "string",
399
+ "description": "Transaction notes"
400
+ },
401
+ "currency": {
402
+ "type": "string",
403
+ "description": "Transaction currency",
404
+ "default": "USD"
405
+ },
406
+ "exchange_rate": {
407
+ "type": "number",
408
+ "description": "Exchange rate to portfolio base currency",
409
+ "default": 1
410
+ },
411
+ "backtest_run_id": {
412
+ "type": "string",
413
+ "description": "Backtest run ID (for simulated trades)"
414
+ },
415
+ "simulated_date": {
416
+ "type": "string",
417
+ "description": "Simulated date for backtest (ISO format)"
418
+ }
419
+ },
420
+ "required": [
421
+ "portfolio_id",
422
+ "asset_id",
423
+ "transaction_type",
424
+ "quantity",
425
+ "price_per_unit",
426
+ "transaction_date"
427
+ ]
428
+ }
429
+ },
430
+ {
431
+ "name": "list_transactions",
432
+ "description": "List transaction history with optional portfolio/asset filtering",
433
+ "method": "GET",
434
+ "path": "/list-transactions",
435
+ "input_schema": {
436
+ "type": "object",
437
+ "properties": {
438
+ "portfolio_id": {
439
+ "type": "string",
440
+ "description": "Filter by portfolio ID (optional)"
441
+ },
442
+ "asset_id": {
443
+ "type": "string",
444
+ "description": "Filter by asset ID"
445
+ },
446
+ "transaction_type": {
447
+ "type": "string",
448
+ "description": "Filter by transaction type"
449
+ },
450
+ "start_date": {
451
+ "type": "string",
452
+ "description": "Start date filter (YYYY-MM-DD)"
453
+ },
454
+ "end_date": {
455
+ "type": "string",
456
+ "description": "End date filter (YYYY-MM-DD)"
457
+ },
458
+ "limit": {
459
+ "type": "integer",
460
+ "description": "Maximum results",
461
+ "default": 50,
462
+ "maximum": 500
463
+ },
464
+ "offset": {
465
+ "type": "integer",
466
+ "description": "Pagination offset",
467
+ "default": 0
468
+ }
469
+ }
470
+ }
471
+ },
472
+ {
473
+ "name": "create_portfolio_order",
474
+ "description": "Create and execute a trade order. Auto-resolves exchange and credentials from portfolio's linked credential. Waits for order fill by default (market orders typically fill within seconds). Returns filled status, transaction, and updated holding.",
475
+ "method": "POST",
476
+ "path": "/create-portfolio-order",
477
+ "input_schema": {
478
+ "type": "object",
479
+ "properties": {
480
+ "portfolio_id": {
481
+ "type": "string",
482
+ "description": "Portfolio ID - exchange and credentials are auto-resolved from the portfolio's linked credential"
483
+ },
484
+ "symbol": {
485
+ "type": "string",
486
+ "description": "Asset symbol (e.g., AAPL, BTC)"
487
+ },
488
+ "side": {
489
+ "type": "string",
490
+ "description": "Order side",
491
+ "enum": [
492
+ "buy",
493
+ "sell"
494
+ ]
495
+ },
496
+ "type": {
497
+ "type": "string",
498
+ "description": "Order type",
499
+ "enum": [
500
+ "market",
501
+ "limit",
502
+ "stop",
503
+ "stop_limit"
504
+ ]
505
+ },
506
+ "quantity": {
507
+ "type": "number",
508
+ "description": "Quantity to trade"
509
+ },
510
+ "price": {
511
+ "type": "number",
512
+ "description": "Limit price (for limit/stop_limit orders)"
513
+ },
514
+ "time_in_force": {
515
+ "type": "string",
516
+ "description": "Time in force",
517
+ "enum": [
518
+ "day",
519
+ "gtc",
520
+ "ioc",
521
+ "fok"
522
+ ]
523
+ },
524
+ "wait_for_fill": {
525
+ "type": "boolean",
526
+ "description": "Wait for order to fill before returning (polls exchange until filled/canceled/expired). Returns final status with transaction created.",
527
+ "default": true
528
+ },
529
+ "wait_timeout": {
530
+ "type": "integer",
531
+ "description": "Max time to wait for fill in milliseconds",
532
+ "default": 10000
533
+ },
534
+ "asset_id": {
535
+ "type": "string",
536
+ "description": "Asset ID (optional - resolved from symbol if not provided)"
537
+ },
538
+ "client_order_id": {
539
+ "type": "string",
540
+ "description": "Client order ID for tracking"
541
+ },
542
+ "simulated_date": {
543
+ "type": "string",
544
+ "description": "Execution date for backtest trades (YYYY-MM-DD format)",
545
+ "format": "date"
546
+ },
547
+ "asset_type": {
548
+ "type": "string",
549
+ "description": "Asset type for symbol resolution: stock (default) or crypto. IMPORTANT: Use 'crypto' for cryptocurrencies like BTC, ETH, etc.",
550
+ "enum": [
551
+ "stock",
552
+ "crypto"
553
+ ],
554
+ "default": "stock"
555
+ }
556
+ },
557
+ "required": [
558
+ "portfolio_id",
559
+ "symbol",
560
+ "side",
561
+ "type",
562
+ "quantity"
563
+ ]
564
+ }
565
+ },
566
+ {
567
+ "name": "get_order_status",
568
+ "description": "Check current order status from exchange. Updates our database and creates transaction if filled. Use this to check on limit orders that may not fill immediately.",
569
+ "method": "GET",
570
+ "path": "/get-order-status",
571
+ "input_schema": {
572
+ "type": "object",
573
+ "properties": {
574
+ "order_id": {
575
+ "type": "string",
576
+ "description": "Our database order ID"
577
+ },
578
+ "exchange_order_id": {
579
+ "type": "string",
580
+ "description": "Exchange's order ID (alternative to order_id)"
581
+ },
582
+ "portfolio_id": {
583
+ "type": "string",
584
+ "description": "Portfolio ID (required if using exchange_order_id)"
585
+ },
586
+ "create_transaction": {
587
+ "type": "boolean",
588
+ "description": "Create transaction if order is filled",
589
+ "default": true
590
+ }
591
+ }
592
+ }
593
+ },
594
+ {
595
+ "name": "list_portfolio_orders",
596
+ "description": "List order history for a portfolio with status filtering",
597
+ "method": "GET",
598
+ "path": "/list-portfolio-orders",
599
+ "input_schema": {
600
+ "type": "object",
601
+ "properties": {
602
+ "portfolio_id": {
603
+ "type": "string",
604
+ "description": "Portfolio ID"
605
+ },
606
+ "status": {
607
+ "type": "string",
608
+ "description": "Filter by order status",
609
+ "enum": [
610
+ "pending",
611
+ "filled",
612
+ "partially_filled",
613
+ "cancelled",
614
+ "rejected",
615
+ "all"
616
+ ]
617
+ },
618
+ "asset_id": {
619
+ "type": "string",
620
+ "description": "Filter by asset ID"
621
+ },
622
+ "limit": {
623
+ "type": "integer",
624
+ "description": "Maximum results",
625
+ "default": 50,
626
+ "maximum": 500
627
+ },
628
+ "offset": {
629
+ "type": "integer",
630
+ "description": "Pagination offset",
631
+ "default": 0
632
+ }
633
+ },
634
+ "required": [
635
+ "portfolio_id"
636
+ ]
637
+ }
638
+ },
639
+ {
640
+ "name": "get_portfolio_order",
641
+ "description": "Get detailed information about a specific order",
642
+ "method": "GET",
643
+ "path": "/get-portfolio-order",
644
+ "input_schema": {
645
+ "type": "object",
646
+ "properties": {
647
+ "order_id": {
648
+ "type": "string",
649
+ "description": "Order ID"
650
+ }
651
+ },
652
+ "required": [
653
+ "order_id"
654
+ ]
655
+ }
656
+ },
657
+ {
658
+ "name": "cancel_portfolio_order",
659
+ "description": "Cancel a pending order on the exchange",
660
+ "method": "GET",
661
+ "path": "/cancel-portfolio-order",
662
+ "input_schema": {
663
+ "type": "object",
664
+ "properties": {
665
+ "order_id": {
666
+ "type": "string",
667
+ "description": "Order ID to cancel"
668
+ }
669
+ },
670
+ "required": [
671
+ "order_id"
672
+ ]
673
+ }
674
+ },
675
+ {
676
+ "name": "sync_portfolio_order",
677
+ "description": "Sync order status from exchange and update portfolio records",
678
+ "method": "GET",
679
+ "path": "/sync-portfolio-order",
680
+ "input_schema": {
681
+ "type": "object",
682
+ "properties": {
683
+ "order_id": {
684
+ "type": "string",
685
+ "description": "Order ID to sync"
686
+ }
687
+ },
688
+ "required": [
689
+ "order_id"
690
+ ]
691
+ }
692
+ },
693
+ {
694
+ "name": "run_backtest",
695
+ "description": "Create and run an AI agent backtest against historical data to test trading strategies",
696
+ "method": "GET",
697
+ "path": "/run-backtest",
698
+ "input_schema": {
699
+ "type": "object",
700
+ "properties": {
701
+ "user_id": {
702
+ "type": "string",
703
+ "description": "User ID"
704
+ },
705
+ "agent_id": {
706
+ "type": "string",
707
+ "description": "AI Agent ID (optional - will create temporary agent if not provided)"
708
+ },
709
+ "name": {
710
+ "type": "string",
711
+ "description": "Strategy name"
712
+ },
713
+ "system_prompt": {
714
+ "type": "string",
715
+ "description": "AI agent trading strategy prompt"
716
+ },
717
+ "model": {
718
+ "type": "string",
719
+ "description": "LLM model to use",
720
+ "default": "claude-sonnet-4-5-20250929"
721
+ },
722
+ "start_date": {
723
+ "type": "string",
724
+ "description": "Backtest start date (YYYY-MM-DD)"
725
+ },
726
+ "end_date": {
727
+ "type": "string",
728
+ "description": "Backtest end date (YYYY-MM-DD)"
729
+ },
730
+ "initial_cash": {
731
+ "type": "number",
732
+ "description": "Starting capital"
733
+ },
734
+ "max_position_size": {
735
+ "type": "number",
736
+ "description": "Max position size as % of portfolio"
737
+ },
738
+ "max_positions": {
739
+ "type": "integer",
740
+ "description": "Maximum number of positions",
741
+ "default": 10
742
+ },
743
+ "stop_loss_percentage": {
744
+ "type": "number",
745
+ "description": "Stop loss threshold percentage"
746
+ },
747
+ "rebalance_frequency": {
748
+ "type": "string",
749
+ "description": "Decision frequency: daily or weekly",
750
+ "enum": [
751
+ "daily",
752
+ "weekly"
753
+ ],
754
+ "default": "daily"
755
+ }
756
+ },
757
+ "required": [
758
+ "user_id",
759
+ "name",
760
+ "system_prompt",
761
+ "start_date",
762
+ "end_date",
763
+ "initial_cash"
764
+ ]
765
+ }
766
+ },
767
+ {
768
+ "name": "execute_backtest_simulation",
769
+ "description": "Execute the backtest simulation engine (may take several minutes)",
770
+ "method": "GET",
771
+ "path": "/execute-backtest-simulation",
772
+ "input_schema": {
773
+ "type": "object",
774
+ "properties": {
775
+ "run_id": {
776
+ "type": "string",
777
+ "description": "Backtest run ID"
778
+ }
779
+ },
780
+ "required": [
781
+ "run_id"
782
+ ]
783
+ }
784
+ },
785
+ {
786
+ "name": "get_backtest_performance",
787
+ "description": "Get comprehensive performance metrics including returns, Sharpe ratio, drawdown, and win rate",
788
+ "method": "GET",
789
+ "path": "/get-backtest-performance",
790
+ "input_schema": {
791
+ "type": "object",
792
+ "properties": {
793
+ "run_id": {
794
+ "type": "string",
795
+ "description": "Backtest run ID"
796
+ }
797
+ },
798
+ "required": [
799
+ "run_id"
800
+ ]
801
+ }
802
+ },
803
+ {
804
+ "name": "get_backtest_trades",
805
+ "description": "Get all trades from backtest with entry/exit prices and P&L",
806
+ "method": "GET",
807
+ "path": "/get-backtest-trades",
808
+ "input_schema": {
809
+ "type": "object",
810
+ "properties": {
811
+ "run_id": {
812
+ "type": "string",
813
+ "description": "Backtest run ID"
814
+ },
815
+ "asset_id": {
816
+ "type": "string",
817
+ "description": "Filter by asset ID"
818
+ },
819
+ "limit": {
820
+ "type": "integer",
821
+ "description": "Maximum results",
822
+ "default": 100
823
+ },
824
+ "offset": {
825
+ "type": "integer",
826
+ "description": "Pagination offset",
827
+ "default": 0
828
+ }
829
+ },
830
+ "required": [
831
+ "run_id"
832
+ ]
833
+ }
834
+ },
835
+ {
836
+ "name": "get_backtest_decisions",
837
+ "description": "Get AI agent decisions and reasoning from backtest - see what the agent was thinking",
838
+ "method": "GET",
839
+ "path": "/get-backtest-decisions",
840
+ "input_schema": {
841
+ "type": "object",
842
+ "properties": {
843
+ "run_id": {
844
+ "type": "string",
845
+ "description": "Backtest run ID"
846
+ },
847
+ "date": {
848
+ "type": "string",
849
+ "description": "Filter by specific date (YYYY-MM-DD)"
850
+ }
851
+ },
852
+ "required": [
853
+ "run_id"
854
+ ]
855
+ }
856
+ },
857
+ {
858
+ "name": "get_backtest_daily_performance",
859
+ "description": "Get daily portfolio values and returns for charting",
860
+ "method": "GET",
861
+ "path": "/get-backtest-daily-performance",
862
+ "input_schema": {
863
+ "type": "object",
864
+ "properties": {
865
+ "run_id": {
866
+ "type": "string",
867
+ "description": "Backtest run ID"
868
+ },
869
+ "start_date": {
870
+ "type": "string",
871
+ "description": "Filter from date (YYYY-MM-DD)"
872
+ },
873
+ "end_date": {
874
+ "type": "string",
875
+ "description": "Filter to date (YYYY-MM-DD)"
876
+ }
877
+ },
878
+ "required": [
879
+ "run_id"
880
+ ]
881
+ }
882
+ },
883
+ {
884
+ "name": "compare_backtest_runs",
885
+ "description": "Compare performance metrics across multiple backtest runs to find the best strategy",
886
+ "method": "GET",
887
+ "path": "/compare-backtest-runs",
888
+ "input_schema": {
889
+ "type": "object",
890
+ "properties": {
891
+ "run_ids": {
892
+ "type": "array",
893
+ "description": "Array of backtest run IDs (max 10)",
894
+ "items": {
895
+ "type": "string"
896
+ },
897
+ "maxItems": 10
898
+ }
899
+ },
900
+ "required": [
901
+ "run_ids"
902
+ ]
903
+ }
904
+ },
905
+ {
906
+ "name": "list_backtest_runs",
907
+ "description": "List all backtest runs for a user with filtering and pagination",
908
+ "method": "GET",
909
+ "path": "/list-backtest-runs",
910
+ "input_schema": {
911
+ "type": "object",
912
+ "properties": {
913
+ "user_id": {
914
+ "type": "string",
915
+ "description": "User ID"
916
+ },
917
+ "agent_id": {
918
+ "type": "string",
919
+ "description": "Filter by AI agent ID"
920
+ },
921
+ "status": {
922
+ "type": "string",
923
+ "description": "Filter by status",
924
+ "enum": [
925
+ "pending",
926
+ "running",
927
+ "completed",
928
+ "failed"
929
+ ]
930
+ },
931
+ "limit": {
932
+ "type": "integer",
933
+ "description": "Maximum results",
934
+ "default": 50
935
+ },
936
+ "offset": {
937
+ "type": "integer",
938
+ "description": "Pagination offset",
939
+ "default": 0
940
+ }
941
+ },
942
+ "required": [
943
+ "user_id"
944
+ ]
945
+ }
946
+ },
947
+ {
948
+ "name": "get_backtest_run",
949
+ "description": "Get details of a specific backtest run",
950
+ "method": "GET",
951
+ "path": "/get-backtest-run",
952
+ "input_schema": {
953
+ "type": "object",
954
+ "properties": {
955
+ "run_id": {
956
+ "type": "string",
957
+ "description": "Backtest run ID"
958
+ }
959
+ },
960
+ "required": [
961
+ "run_id"
962
+ ]
963
+ }
964
+ },
965
+ {
966
+ "name": "delete_backtest_run",
967
+ "description": "Delete a backtest run and all associated data",
968
+ "method": "DELETE",
969
+ "path": "/delete-backtest-run",
970
+ "input_schema": {
971
+ "type": "object",
972
+ "properties": {
973
+ "run_id": {
974
+ "type": "string",
975
+ "description": "Backtest run ID"
976
+ }
977
+ },
978
+ "required": [
979
+ "run_id"
980
+ ]
981
+ }
982
+ },
983
+ {
984
+ "name": "deploy_backtest_to_live",
985
+ "description": "Deploy a proven backtest strategy to live trading on a real portfolio",
986
+ "method": "GET",
987
+ "path": "/deploy-backtest-to-live",
988
+ "input_schema": {
989
+ "type": "object",
990
+ "properties": {
991
+ "run_id": {
992
+ "type": "string",
993
+ "description": "Backtest run ID"
994
+ },
995
+ "target_portfolio_id": {
996
+ "type": "string",
997
+ "description": "Real portfolio ID to trade on"
998
+ },
999
+ "auto_start": {
1000
+ "type": "boolean",
1001
+ "description": "Automatically start live trading",
1002
+ "default": true
1003
+ }
1004
+ },
1005
+ "required": [
1006
+ "run_id",
1007
+ "target_portfolio_id"
1008
+ ]
1009
+ }
1010
+ }
1011
+ ]
1012
+ }