{"openapi":"3.1.0","info":{"title":"Pôle Finance API","version":"1.0.0","description":"The Pôle Finance instrument directory, plus technical, risk and optimization engines applied to series you send. Market data is listed but disabled until redistribution rights are cleared."},"servers":[{"url":"https://polefinance-invest.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"pf_live_… key from the developer dashboard"}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}}}}}}}}},"schemas":{"Instrument":{"type":"object","properties":{"id":{"type":"string","example":"BRVM:SNTS"},"symbol":{"type":"string"},"name":{"type":"string"},"exchange":{"type":"string"},"currency":{"type":"string"},"instrument_type":{"type":"string","enum":["stock","crypto","etf","bond"]},"country":{"type":["string","null"]},"sector":{"type":["string","null"]},"listing_status":{"type":"string"}}}}},"paths":{"/health":{"get":{"summary":"Service status","security":[],"responses":{"200":{"description":"OK"}}}},"/exchanges":{"get":{"summary":"List exchanges with at least one instrument","x-scope":"instruments:read","responses":{"200":{"description":"Exchanges"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/instruments":{"get":{"summary":"List or search instruments","x-scope":"instruments:read","parameters":[{"name":"exchange","in":"query","schema":{"type":"string"},"example":"BRVM"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Symbol or name"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.next_cursor"}],"responses":{"200":{"description":"Page of instruments"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/instruments/{id}":{"get":{"summary":"One instrument","x-scope":"instruments:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"BRVM:SNTS"}],"responses":{"200":{"description":"Instrument"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/technical/indicators":{"post":{"summary":"SMA, EMA, RSI, MACD, Bollinger, ATR on your price series","x-scope":"analytics:compute","requestBody":{"required":true,"content":{"application/json":{"example":{"close":[101,102.5,101.8],"indicators":[{"name":"rsi","period":14}]}}}},"responses":{"200":{"description":"Indicator values (null during warm-up)"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/risk/metrics":{"post":{"summary":"Volatility, Sharpe, Sortino, max drawdown, historical VaR and ES","x-scope":"analytics:compute","requestBody":{"required":true,"content":{"application/json":{"example":{"prices":[100,101,99.5],"periods_per_year":252,"risk_free_rate":0.03,"confidence":0.95}}}},"responses":{"200":{"description":"Risk metrics"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/optimization/portfolio":{"post":{"summary":"Long-only weights: min_variance, max_sharpe, risk_parity, equal_weight","x-scope":"analytics:compute","requestBody":{"required":true,"content":{"application/json":{"example":{"method":"min_variance","assets":[{"id":"BRVM:SNTS","returns":[0.01,-0.004,0.006]},{"id":"BRVM:ORAC","returns":[0.002,0.003,-0.001]}]}}}},"responses":{"200":{"description":"Weights, expected risk and return, warnings"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/backtests/run":{"post":{"summary":"Backtest a strategy on your price series: metrics, equity curve, drawdown, allocations","x-scope":"analytics:compute","requestBody":{"required":true,"content":{"application/json":{"example":{"dates":["2025-01-02","2025-01-03","…"],"assets":[{"id":"BRVM:SNTS","closes":[17500,17550]},{"id":"BRVM:ORAC","closes":[9800,9790]}],"strategy":"min_variance","rebalance":"monthly","fees":0.012}}}},"responses":{"200":{"description":"Metrics, curve, allocations, methodology, warnings"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/market-data/quotes":{"get":{"summary":"Latest delayed quotes (not yet available)","x-scope":"market_data:read","x-status":"disabled","parameters":[{"name":"instruments","in":"query","required":true,"schema":{"type":"string"},"example":"BRVM:SNTS,BRVM:ORAC"}],"responses":{"200":{"description":"Quotes"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}}}}