{"id":41464145,"url":"https://github.com/coinbase-samples/exchange-scripts-py","last_synced_at":"2026-01-23T16:18:28.763Z","repository":{"id":177370891,"uuid":"659809470","full_name":"coinbase-samples/exchange-scripts-py","owner":"coinbase-samples","description":"Coinbase Exchange FIX API sample scripts","archived":false,"fork":false,"pushed_at":"2024-07-08T17:22:37.000Z","size":68,"stargazers_count":13,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-07-08T22:07:37.973Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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":null,"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}},"created_at":"2023-06-28T15:51:27.000Z","updated_at":"2024-07-08T17:22:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ff521a5-d4dd-4c20-91e8-c75702af9198","html_url":"https://github.com/coinbase-samples/exchange-scripts-py","commit_stats":null,"previous_names":["coinbase-samples/exchange-scripts-py"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coinbase-samples/exchange-scripts-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fexchange-scripts-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fexchange-scripts-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fexchange-scripts-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fexchange-scripts-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coinbase-samples","download_url":"https://codeload.github.com/coinbase-samples/exchange-scripts-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase-samples%2Fexchange-scripts-py/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:28.006Z","updated_at":"2026-01-23T16:18:28.730Z","avatar_url":"https://github.com/coinbase-samples.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exchange API Scripts\n\nThis repository provides Python examples of the Coinbase Exchange Public APIs.\n# Getting started\n\n## 1. Gaining access\n\nClone the repository with the following command:\n```\ngit clone https://github.com/coinbase-samples/exchange-scripts-py\n```\n\n## 2. Configuration\n\nDepending on if you are accessing REST or FIX, dependencies will differ. Within each folder, you will find a requirements.txt file, from which you will be able to install dependencies with the following command: \n\n```\npip install -r requirements.txt\n```\n\nAdditionally, these scripts make use of environment variables where applicable. Please note that only the first three values noted below are needed for REST APIs. The remainder are requirements for FIX. \n\nTo fill these values, you will need to generate an API key with trading and reading functionality and also retrieve your portfolio ID, which is provided in the response of [Get Products](https://docs.cdp.coinbase.com/exchange/reference/exchangerestapi_getprofiles). Finally, your SVC_ACCOUNTID is identical to your API_KEY. Populate the below and run the following to declare these variables:\n\n```bash\n\nexport API_KEY=API_KEY_HERE\nexport PASSPHRASE=PASSPHRASE_HERE\nexport SECRET_KEY=SECRET_KEY_HERE\nexport PORTFOLIO_ID=PORTFOLIO_ID_HERE\nexport SVC_ACCOUNTID=SVC_ACCOUNT_ID_HERE\nexport FIX_VERSION=FIXT.1.1\nexport DEFAULT_APPL_VER_ID=9\nexport TARGET_COMP_ID=Coinbase\n```\n\n## 3. Running scripts\n\nFor REST, scripts are entirely standalone and do not require any main application to access. You can run them simply by running a command like the following:\n```\npython script_name_here.py\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase-samples%2Fexchange-scripts-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoinbase-samples%2Fexchange-scripts-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase-samples%2Fexchange-scripts-py/lists"}