add latest exchange rates command

This commit is contained in:
MaysWind
2026-02-02 23:04:28 +08:00
parent fa568056d3
commit 983c65e4f8
2 changed files with 50 additions and 0 deletions
+25
View File
@@ -460,6 +460,31 @@ $API_CONFIGS = @(
"}"
)
}
@{
Name = "exchangerates-latest"
Description = "Get latest exchange rates"
Method = "GET"
Path = "exchange_rates/latest.json"
RequiresTimezone = $false
RequiredParams = @()
OptionalParams = @()
ParamTypes = @{}
ParamDescriptions = @{}
ResponseStructure = @(
"{"
" `"dataSource`": `"string (Exchange rate data source name)`","
" `"referenceUrl`": `"string (Exchange rate data reference URL)`","
" `"updateTime`": `"integer (Exchange rate data update unix time)`","
" `"baseCurrency`": `"string (Base currency code)`","
" `"exchangeRates`": ["
" {"
" `"currency`": `"string (Currency code)`","
" `"rate`": `"string (Exchange rate, 1 unit of base currency equals to how many units of this currency)`""
" }"
" ]"
"}"
)
}
)
# Reference: https://github.com/unicode-org/cldr/blob/main/common/supplemental/windowsZones.xml
+25
View File
@@ -445,6 +445,31 @@ API_CONFIGS='[
" \"editable\": \"boolean (Whether the transaction is editable)\"",
"}"
]
},
{
"Name": "exchangerates-latest",
"Description": "Get latest exchange rates",
"Method": "GET",
"Path": "exchange_rates/latest.json",
"RequiresTimezone": false,
"RequiredParams": [],
"OptionalParams": [],
"ParamTypes": {},
"ParamDescriptions": {},
"ResponseStructure": [
"{",
" \"dataSource\": \"string (Exchange rate data source name)\",",
" \"referenceUrl\": \"string (Exchange rate data reference URL)\",",
" \"updateTime\": \"integer (Exchange rate data update unix time)\",",
" \"baseCurrency\": \"string (Base currency code)\",",
" \"exchangeRates\": [",
" {",
" \"currency\": \"string (Currency code)\",",
" \"rate\": \"string (Exchange rate, 1 unit of base currency equals to how many units of this currency)\"",
" }",
" ]",
"}"
]
}
]'