{"id":41464126,"url":"https://github.com/coinbase-samples/advanced-sdk-ts","last_synced_at":"2026-01-23T16:18:26.604Z","repository":{"id":257669376,"uuid":"832376525","full_name":"coinbase-samples/advanced-sdk-ts","owner":"coinbase-samples","description":"Sample TypeScript SDK for the Coinbase Advanced APIs","archived":false,"fork":false,"pushed_at":"2025-04-23T14:40:12.000Z","size":298,"stargazers_count":32,"open_issues_count":5,"forks_count":16,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-23T15:46:56.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.cdp.coinbase.com/advanced-trade/docs/welcome","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-22T22:45:30.000Z","updated_at":"2025-04-23T14:39:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb45d893-55e7-47be-84eb-fb0fcfe59858","html_url":"https://github.com/coinbase-samples/advanced-sdk-ts","commit_stats":null,"previous_names":["coinbase-samples/advanced-sdk-ts"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/coinbase-samples/advanced-sdk-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fadvanced-sdk-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fadvanced-sdk-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fadvanced-sdk-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fadvanced-sdk-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coinbase-samples","download_url":"https://codeload.github.com/coinbase-samples/advanced-sdk-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fadvanced-sdk-ts/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:18:26.014Z","updated_at":"2026-01-23T16:18:26.595Z","avatar_url":"https://github.com/coinbase-samples.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coinbase Advanced API TypeScript SDK\n\nWelcome to the Coinbase Advanced API TypeScript SDK. This TypeScript project was created to allow developers to easily plug into the [Coinbase Advanced API](https://docs.cdp.coinbase.com/advanced-trade/docs/welcome).\n\nCoinbase Advanced Trade offers a comprehensive API for traders, providing access to real-time market data, order management, and execution. Elevate your trading strategies and develop sophisticated solutions using our powerful tools and features.\n\nFor more information on all the available REST endpoints, see the [API Reference](https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/introduction).\n\n---\n\n## Installation\n\n```bash\nnpm install @coinbase-sample/advanced-trade-sdk-ts\n```\n\n---\n\n## Build and Use\n\nTo build the project, run the following command:\n\n```bash\nnpm run build\n```\n\n_Note: To avoid potential issues, do not forget to build your project again after making any changes to it._\n\nAfter building the project, each `.ts` file will have its `.js` counterpart generated.\n\nTo run a file, use the following command:\n\n```\nnode dist/{INSERT-FILENAME}.js\n```\n\nFor example, a `main.ts` file would be run like:\n\n```bash\nnode dist/main.js\n```\n\n---\n\n## Coinbase Developer Platform (CDP) API Keys\n\nThis SDK uses Coinbase Developer Platform (CDP) API keys. To use this SDK, you will need to create a [CDP API key and secret](https://portal.cdp.coinbase.com/projects/api-keys).\nMake sure to save your API key and secret in a safe place. You will not be able to retrieve your secret again.\n\n---\n\n## Importing the RESTClient\n\nAll the REST endpoints are available directly from the client, therefore it's all you need to import.\n\n```\nimport { CoinbaseAdvTradeClient } from '@coinbase-samples/advanced-trade-sdk-ts';\n```\n\n---\n\n## Authentication\n\nAuthentication of CDP API Keys is handled automatically by the SDK when making a REST request.\n\nAfter creating your CDP API keys, store them using your desired method and simply pass them into the client during initialization like:\n\n```\nconst credentials = new CoinbaseAdvTradeCredentials(\n  process.env.KEY_NAME,\n  process.env.PRIVATE_KEY\n);\n\nconst client = new CoinbaseAdvTradeClient(credentials);\n```\n\n---\n\n## Making Requests\n\nHere are a few examples requests:\n\n**[List Accounts](https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/accounts/list-accounts)**\n\n```\nconst accountService = new AccountsService(client);\naccountService\n    .listAccounts({})\n    .then((result) =\u003e {\n        console.log(result);\n    })\n    .catch((error) =\u003e {\n        console.error(error.message);\n    });\n```\n\n**[Get Product](https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/get-product)**\n\n```\nproductService = new ProductsService(client);\nproductService\n    .getProduct({productId: \"BTC-USD\"})\n    .then((result) =\u003e {\n        console.log(result);\n    })\n    .catch((error) =\u003e {\n        console.error(error.message);\n    });\n```\n\n**[Create Order](https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/create-order)**\n\n_$10 Market Buy on BTC-USD_\n\n```\nconst orderService = new OrdersService(client);\norderService\n    .createOrder({\n        clientOrderId: \"00000001\",\n        productId: \"BTC-USD\",\n        side: OrderSide.BUY,\n        orderConfiguration:{\n            marketMarketIoc: {\n                quoteSize: \"10\"\n            }\n        }\n    })\n    .then((result) =\u003e {\n        console.log(result);\n    })\n    .catch((error) =\u003e {\n        console.error(error.message);\n    });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase-samples%2Fadvanced-sdk-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoinbase-samples%2Fadvanced-sdk-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase-samples%2Fadvanced-sdk-ts/lists"}