Search foreign exchange data
valyu.markets.forex.searchFind currency-pair rates and history.
- 価格
- $0.06/callカタログ価格で提供
- 成功率
- 91.7%直近 30 日 · 24 回
- レイテンシ p50
- 1.6 sp95 5 s
- 最終確認
- —未確認
POSThttps://toolswitch.dev/v1/tools/valyu.markets.forex.searchBeta- プラットフォームのクォータを使用
- 同期レスポンス
- 公開データを読み取る
パラメータ
The selected Valyu sources are fixed for shared-key calls; use a Valyu own tool for arbitrary source mixes.
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| リクエストボディ(JSON) | ||||
query | 文字列 | 必須 | USD EUR exchange rate | |
max_price | 数値 | 必須 | 6 | |
search_type | 文字列 | 必須 | proprietary | |
max_num_results | 整数 | 必須 | 1 | |
response_length | 文字列 | 必須 | short | |
included_sources | array[string] | 必須 | ["valyu/valyu-forex"] | |
- リクエストボディ(JSON)
query文字列必須例:
USD EUR exchange ratemax_price数値必須例:
6search_type文字列必須例:
proprietarymax_num_results整数必須例:
1response_length文字列必須例:
shortincluded_sourcesarray[string]必須例:
["valyu/valyu-forex"]
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
Beta
curl -X POST 'https://toolswitch.dev/v1/tools/valyu.markets.forex.search' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"query":"USD EUR exchange rate","max_price":6,"search_type":"proprietary","max_num_results":1,"response_length":"short","included_sources":["valyu/valyu-forex"]}'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/valyu.markets.forex.search",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("{\"query\":\"USD EUR exchange rate\",\"max_price\":6,\"search_type\":\"proprietary\",\"max_num_results\":1,\"response_length\":\"short\",\"included_sources\":[\"valyu/valyu-forex\"]}"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/valyu.markets.forex.search", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("{\"query\":\"USD EUR exchange rate\",\"max_price\":6,\"search_type\":\"proprietary\",\"max_num_results\":1,\"response_length\":\"short\",\"included_sources\":[\"valyu/valyu-forex\"]}")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());このゲートウェイ API は Beta です。URL や認証方式は変更される場合があります。 パラメータはサンプルデータです。 呼び出し料金は $0.06/call です。サービス料を含みます。