MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / testConnection

Function testConnection

ui/src/api/trading.ts:267–274  ·  view source on GitHub ↗

* Test broker credentials before committing them. Accepts either a full * UTAConfig (during edit) or a draft without an id (during create) — the * server stamps `__test__` if id is absent.

(uta: UTAConfig | Omit<UTAConfig, 'id'>)

Source from the content-addressed store, hash-verified

265 * server stamps `__test__` if id is absent.
266 */
267 async testConnection(uta: UTAConfig | Omit<UTAConfig, 'id'>): Promise<TestConnectionResult> {
268 const res = await fetch('/api/trading/config/test-connection', {
269 method: 'POST',
270 headers: { 'Content-Type': 'application/json' },
271 body: JSON.stringify(uta),
272 })
273 return res.json()
274 },
275}
276
277// ==================== Internal helpers ====================

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected