{"id":41464113,"url":"https://github.com/coinbase-samples/exchange-sdk-ts","last_synced_at":"2026-01-23T16:17:59.920Z","repository":{"id":295817114,"uuid":"983777371","full_name":"coinbase-samples/exchange-sdk-ts","owner":"coinbase-samples","description":"TypeScript SDK for the Coinbase Exchange REST APIs","archived":false,"fork":false,"pushed_at":"2025-09-30T23:06:17.000Z","size":194,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-08T08:37:19.167Z","etag":null,"topics":["coinbase","exchange","javascript","typescript"],"latest_commit_sha":null,"homepage":"https://docs.cdp.coinbase.com/exchange/reference/introduction","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-14T22:47:10.000Z","updated_at":"2025-05-27T14:20:03.000Z","dependencies_parsed_at":"2025-05-27T14:41:12.875Z","dependency_job_id":"79df71da-abae-4c3d-8089-51b8dce6d808","html_url":"https://github.com/coinbase-samples/exchange-sdk-ts","commit_stats":null,"previous_names":["coinbase-samples/exchange-sdk-ts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coinbase-samples/exchange-sdk-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fexchange-sdk-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fexchange-sdk-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fexchange-sdk-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fexchange-sdk-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coinbase-samples","download_url":"https://codeload.github.com/coinbase-samples/exchange-sdk-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fexchange-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":["coinbase","exchange","javascript","typescript"],"created_at":"2026-01-23T16:17:58.848Z","updated_at":"2026-01-23T16:17:59.908Z","avatar_url":"https://github.com/coinbase-samples.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coinbase Exchange API TypeScript SDK\n\n## Overview\n\nWelcome to the Coinbase Exchange API TypeScript SDK. This TypeScript project was created to allow developers to easily plug into the [Coinbase Exchange API](https://docs.cdp.coinbase.com/exchange/docs/welcome).\n\n---\n\n## Installation\n\n```bash\nnpm install @coinbase-sample/exchange-sdk-ts\n```\n\n## License\n\nThe _Exchange Typescript 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\nHere are a few examples requests:\n\n**Configure Credentials**\n\n```\nconst creds = JSON.parse(process.env.EXCHANGE_CREDENTIALS);\n\nconst credentials = new CoinbaseExchangeCredentials(\n  creds.AccessKey,\n  creds.SecretKey,\n  creds.Passphrase\n);\n\nconst client = new CoinbaseExchangeClient(credentials);\n```\n\n**[List Orders]https://docs.cdp.coinbase.com/exchange/reference/exchangerestapi_getorders)**\n\n```\nconst service = new OrdersService(client);\n\nservice\n  .listOrders()\n  .then((orders) =\u003e {\n    console.log(orders);\n  })\n  .catch(console.error);\n```\n\n**[Get Trading Pairs](https://docs.cdp.coinbase.com/exchange/reference/exchangerestapi_getproducts)**\n\n```\nconst service = new ProductsService(client);\n\nservice\n    .listTradingPairs({entityId: \"somePortfolioId\"})\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/exchange/reference/exchangerestapi_postorders)**\n\n_$10 Market Buy on BTC-USD_\n\n```\nclient\n    .createOrder({\n        portfolioId: \"somePortfolioId\",\n        productId: \"BTC-USD\",\n        side: OrderSide.BUY,\n        type: OrderType.Market,\n        baseQuantity: \"0.0001\"\n    })\n    .then((result) =\u003e {\n        console.log(result);\n    })\n    .catch((error) =\u003e {\n        console.error(error.message);\n    });\n```\n\n## Development Installation\n\n```bash\nnpm install\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase-samples%2Fexchange-sdk-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoinbase-samples%2Fexchange-sdk-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase-samples%2Fexchange-sdk-ts/lists"}