go-twelvedata
БесплатноБез исполняемых скриптовНе проверенUnofficial Go client for the Twelve Data market data API, generated with oapi-codegen. Package twelvedata (github.com/psyb0t/go-twelvedata) provides typed…
от psyb0t882 установки в других каталогахОб этом скилле
go-twelvedata
Unofficial, typed Go client for the Twelve Data API, in package twelvedata at the module root.
Read references/setup.md before writing calls. It covers installation, authentication, representative operations, responses and request limits.
Security & safety
- Read the API key from
TWELVEDATA_API_KEY. SetAuthorization: apikey <key>throughWithRequestEditorFn. Never hardcode, commit or log the key or an authenticated request. - Use
https://api.twelvedata.com. The spec also permits anapikeyquery parameter, which can expose the key in URL logs. - Calls consume API credits. Respect the user's plan, data permissions and request budget.
When to use
- Go code needs prices, quotes, historical candles, technical indicators, fundamentals or instrument lists from Twelve Data.
- Go code needs to combine market data requests with the batch endpoint.
- The project already imports
github.com/psyb0t/go-twelvedata.
When NOT to use
- The code is not Go. This module ships only a Go package.
- You need a client maintained by Twelve Data. This one is unofficial and not affiliated with Twelve Data.
- You want to change the generated client itself. Read
AGENTS.mdin the repository.
Finding endpoints and types
The example below covers one call. Every operation in the spec has a generated method, and the spec's descriptions are on them as Go doc comments. Look names and fields up instead of guessing. After go get github.com/psyb0t/go-twelvedata, from inside your module:
go doc github.com/psyb0t/go-twelvedata ClientWithResponsesInterface # every endpoint method
go doc github.com/psyb0t/go-twelvedata GetTimeSeriesParams # one method, params type or model
go doc -all github.com/psyb0t/go-twelvedata # the whole package
The same documentation is at https://pkg.go.dev/github.com/psyb0t/go-twelvedata.
Method names come from the spec's operation IDs. <OperationId>WithResponse takes the context, then the path parameters in order, then *<OperationId>Params when the operation has query or header parameters, then the request body when it has one. The JSON200 field (or JSON201 and so on, per declared status) holds the decoded body; it is nil for any other status. Parameter fields carry the provider's x-go-name names, so outputsize is PageSize and dp is DecimalPlaces, and the batch endpoint POST /batch is AdvancedWithResponse.
Usage
The README example also lives in example_test.go:
package main
import (
"context"
"net/http"
"os"
"github.com/psyb0t/go-twelvedata"
)
func main() {
auth := twelvedata.WithRequestEditorFn(
func(_ context.Context, req *http.Request) error {
req.Header.Set(
"Authorization",
"apikey "+os.Getenv("TWELVEDATA_API_KEY"),
)
return nil
},
)
client, err := twelvedata.NewClientWithResponses(
"https://api.twelvedata.com",
auth,
)
if err != nil {
panic(err)
}
const symbol = "SYMBOL_X"
res, err := client.GetPriceWithResponse(
context.Background(),
&twelvedata.GetPriceParams{Symbol: new(symbol)},
)
if err != nil {
panic(err)
}
_ = res.JSON200
}
Replace SYMBOL_X with the requested instrument. Check StatusCode() and the appropriate decoded status field before using a response. A nil Go error covers transport and decoding, not HTTP success. JSON200 can be nil.
The Price response field is a string. Number schemas map to float64; many market price fields remain strings as defined by the provider.
Before finishing a change, compile the calling code and test its request and response handling against a local HTTP server. Tests must not spend provider credits.
Установить go-twelvedata в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл go-twelvedata?
Unofficial Go client for the Twelve Data market data API, generated with oapi-codegen. Package twelvedata (github.com/psyb0t/go-twelvedata) provides typed REST methods for prices, quotes, time series, technical indicators, fundamentals, instrument metadata and batch queries. Use when Go code needs Twelve Data market data or already imports go-twelvedata.
Как установить скилл go-twelvedata?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл go-twelvedata запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic