{"id":41464105,"url":"https://github.com/coinbase-samples/prime-sdk-go","last_synced_at":"2026-01-23T16:17:59.187Z","repository":{"id":185947645,"uuid":"633227529","full_name":"coinbase-samples/prime-sdk-go","owner":"coinbase-samples","description":"Sample Go SDK for the Coinbase Prime REST APIs","archived":false,"fork":false,"pushed_at":"2026-01-21T19:53:25.000Z","size":244,"stargazers_count":23,"open_issues_count":1,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-22T08:11:32.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.cdp.coinbase.com/prime/docs/rest-requests","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coinbase-samples.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-27T03:46:29.000Z","updated_at":"2025-12-15T16:20:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd5f59ac-ebbc-41e8-be0e-3f143b25f734","html_url":"https://github.com/coinbase-samples/prime-sdk-go","commit_stats":null,"previous_names":["coinbase-samples/prime-sdk-go"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/coinbase-samples/prime-sdk-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fprime-sdk-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fprime-sdk-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fprime-sdk-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fprime-sdk-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coinbase-samples","download_url":"https://codeload.github.com/coinbase-samples/prime-sdk-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fprime-sdk-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28695529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T15:57:05.722Z","status":"ssl_error","status_checked_at":"2026-01-23T15:56:27.656Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-23T16:17:58.572Z","updated_at":"2026-01-23T16:17:59.169Z","avatar_url":"https://github.com/coinbase-samples.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prime Go SDK README\n\n[![GoDoc](https://godoc.org/github.com/coinbase-samples/prime-sdk-go?status.svg)](https://godoc.org/github.com/coinbase-samples/prime-sdk-go)\n[![Go Report Card](https://goreportcard.com/badge/coinbase-samples/prime-sdk-go)](https://goreportcard.com/report/coinbase-samples/prime-sdk-go)\n\n## Overview\n\nThe *Prime Go SDK* is a sample libary that demonstrates the structure of a [Coinbase Prime](https://prime.coinbase.com/) driver for\nthe [REST APIs](https://docs.cloud.coinbase.com/prime/reference).\n\n## License\n\nThe *Prime Go SDK* sample library is free and open source and released under the [Apache License, Version 2.0](LICENSE).\n\nThe application and code are only available for demonstration purposes.\n\n## Usage\n\nTo use the *Prime Go SDK*, initialize the [Credentials](credentials.go) struct and create a new client. The Credentials struct is JSON\nenabled. Ensure that Prime API credentials are stored in a secure manner.\n\n```\nprimeCredentials, err := credentials.ReadEnvCredentials(\"PRIME_CREDENTIALS\")\nif err != nil {\n    log.Fatalf(\"unable to load prime credentials: %v\", err)\n}\n\nhttpClient, err := client.DefaultHttpClient()\nif err != nil {\n    log.Fatalf(\"unable to load default http client: %v\", err)\n}\n\nclient := client.NewRestClient(primeCredentials, httpClient)\n```\n\nThe credentials.ReadEnvCredentials is a convenience function to read the credentials from an environment variable and deserialize the JSON structure. Use credentials.UnmarshalCredentials,\nif pulled from a different source. The JSON format expected by both is:\n\n```\n{\n  \"accessKey\": \"\",\n  \"passphrase\": \"\",\n  \"signingKey\": \"\",\n  \"portfolioId\": \"\",\n  \"svcAccountId\": \"\",\n  \"entityId\": \"\"\n}\n```\n\nCoinbase Prime API credentials can be created in the Prime web console under Settings -\u003e APIs. Entity ID can be retrieved by calling [Get Portfolio](https://docs.cdp.coinbase.com/prime/reference/primerestapi_getportfolio).\n\nOnce the client is initialized, instantiate a service to make the desired call. For example, to list portfolios, create the service, pass in the request object, check for an error, and if nil, process the response.\n\n```\nservice := portfolios.NewPortfoliosService(client)\n\nresponse, err := service.ListPortfolios(ctx, \u0026portfolios.ListPortfoliosRequest{})\n```\n\n## Build\n\nTo build the sample library, ensure that [Go](https://go.dev/) 1.19+ is installed and then run:\n\n```bash\ngo build ./...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase-samples%2Fprime-sdk-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoinbase-samples%2Fprime-sdk-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase-samples%2Fprime-sdk-go/lists"}