{"id":40344514,"url":"https://github.com/solomeowl/backpack_exchange_sdk","last_synced_at":"2026-01-20T09:06:59.060Z","repository":{"id":226635145,"uuid":"769220073","full_name":"solomeowl/backpack_exchange_sdk","owner":"solomeowl","description":"The Backpack Exchange SDK provides a convenient interface for interacting with the Backpack Exchange API.","archived":false,"fork":false,"pushed_at":"2026-01-14T01:18:25.000Z","size":171,"stargazers_count":43,"open_issues_count":1,"forks_count":16,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-14T05:06:14.366Z","etag":null,"topics":["backpack","backpack-exchange","python3","sdk-python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solomeowl.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-08T15:34:51.000Z","updated_at":"2026-01-14T01:18:29.000Z","dependencies_parsed_at":"2024-04-02T13:46:43.293Z","dependency_job_id":"266ad1ca-41c6-4fe7-b1d4-2d567b1afb3e","html_url":"https://github.com/solomeowl/backpack_exchange_sdk","commit_stats":null,"previous_names":["solomeowl/backpack_exchange_sdk"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/solomeowl/backpack_exchange_sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solomeowl%2Fbackpack_exchange_sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solomeowl%2Fbackpack_exchange_sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solomeowl%2Fbackpack_exchange_sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solomeowl%2Fbackpack_exchange_sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solomeowl","download_url":"https://codeload.github.com/solomeowl/backpack_exchange_sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solomeowl%2Fbackpack_exchange_sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28599869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T08:51:33.170Z","status":"ssl_error","status_checked_at":"2026-01-20T08:51:10.855Z","response_time":117,"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":["backpack","backpack-exchange","python3","sdk-python"],"created_at":"2026-01-20T09:06:59.004Z","updated_at":"2026-01-20T09:06:59.055Z","avatar_url":"https://github.com/solomeowl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backpack Exchange SDK\n\n![PyPI - Version](https://img.shields.io/pypi/v/backpack-exchange-sdk?cacheSeconds=300)\n![Python](https://img.shields.io/badge/python-3.7+-blue.svg)\n![License](https://img.shields.io/pypi/l/backpack-exchange-sdk?cacheSeconds=300)\n![CI](https://github.com/solomeowl/backpack_exchange_sdk/actions/workflows/ci.yml/badge.svg)\n\n**English** | [简体中文](./README_zh-Hans.md) | [繁體中文](./README_zh-Hant.md) | [日本語](./README_ja.md) | [한국어](./README_ko.md) | [Español](./README_es.md) | [Português](./README_pt.md)\n\nA complete Python SDK for the [Backpack Exchange](https://backpack.exchange/) API. Supports all 70 API endpoints including REST and WebSocket.\n\n## Project Docs\n\n- [Changelog](./CHANGELOG.md)\n- [Security Policy](./SECURITY.md)\n- [Contributing](./CONTRIBUTING.md)\n\n## Features\n\n- **Authentication Client**: Full access to authenticated endpoints (orders, capital, history, RFQ, strategies)\n- **Public Client**: Access public market data, system status, and trade data\n- **WebSocket Client**: Real-time streaming for market data and account updates\n- **Complete Coverage**: All 70 API endpoints implemented\n- **Type Hints**: Full type annotations for better IDE support\n- **Enums**: Comprehensive enums for type-safe API calls\n\n## Installation\n\n```bash\npip install backpack-exchange-sdk\n```\n\nOr install from source:\n\n```bash\ngit clone https://github.com/solomeowl/backpack_exchange_sdk.git\ncd backpack_exchange_sdk\npip install .\n```\n\n## Quick Start\n\n### Public Client\n\n```python\nfrom backpack_exchange_sdk import PublicClient\n\nclient = PublicClient()\n\n# Get all markets\nmarkets = client.get_markets()\n\n# Get ticker\nticker = client.get_ticker(\"SOL_USDC\")\n\n# Get order book depth\ndepth = client.get_depth(\"SOL_USDC\")\n```\n\n### Authentication Client\n\n```python\nfrom backpack_exchange_sdk import AuthenticationClient\n\nclient = AuthenticationClient(\"\u003cAPI_KEY\u003e\", \"\u003cSECRET_KEY\u003e\")\n\n# Get account balances\nbalances = client.get_balances()\n\n# Place an order\norder = client.execute_order(\n    orderType=\"Limit\",\n    side=\"Bid\",\n    symbol=\"SOL_USDC\",\n    price=\"100\",\n    quantity=\"1\"\n)\n\n# Get order history\nhistory = client.get_order_history(symbol=\"SOL_USDC\")\n```\n\n### Using Enums\n\n```python\nfrom backpack_exchange_sdk import AuthenticationClient\nfrom backpack_exchange_sdk.enums import OrderType, Side, TimeInForce\n\nclient = AuthenticationClient(\"\u003cAPI_KEY\u003e\", \"\u003cSECRET_KEY\u003e\")\n\norder = client.execute_order(\n    orderType=OrderType.LIMIT.value,\n    side=Side.BID.value,\n    symbol=\"SOL_USDC\",\n    price=\"100\",\n    quantity=\"1\",\n    timeInForce=TimeInForce.GTC.value\n)\n```\n\n## API Reference\n\n### Public Client Methods\n\n| Category | Method | Description |\n|----------|--------|-------------|\n| **System** | `get_status()` | Get system status |\n| | `send_ping()` | Ping the server |\n| | `get_system_time()` | Get server time |\n| | `get_wallets()` | Get supported wallets |\n| **Assets** | `get_assets()` | Get all assets |\n| | `get_collateral()` | Get collateral info |\n| **Markets** | `get_markets()` | Get all markets |\n| | `get_market(symbol)` | Get specific market |\n| | `get_ticker(symbol)` | Get ticker |\n| | `get_tickers()` | Get all tickers |\n| | `get_depth(symbol)` | Get order book |\n| | `get_klines(symbol, interval, startTime)` | Get candlesticks |\n| | `get_mark_price(symbol)` | Get mark price |\n| | `get_open_interest(symbol)` | Get open interest |\n| | `get_funding_interval_rates(symbol)` | Get funding rates |\n| **Trades** | `get_recent_trades(symbol)` | Get recent trades |\n| | `get_historical_trades(symbol, limit, offset)` | Get trade history |\n| **Borrow/Lend** | `get_borrow_lend_markets()` | Get lending markets |\n| | `get_borrow_lend_market_history(interval)` | Get lending history |\n| **Prediction** | `get_prediction_markets()` | Get prediction markets |\n| | `get_prediction_tags()` | Get prediction tags |\n\n### Authentication Client Methods\n\n| Category | Method | Description |\n|----------|--------|-------------|\n| **Account** | `get_account()` | Get account settings |\n| | `update_account(...)` | Update account settings |\n| | `get_max_borrow_quantity(symbol)` | Get max borrow amount |\n| | `get_max_order_quantity(symbol, side)` | Get max order size |\n| | `get_max_withdrawal_quantity(symbol)` | Get max withdrawal |\n| **Capital** | `get_balances()` | Get balances |\n| | `get_collateral()` | Get collateral |\n| | `get_deposits()` | Get deposit history |\n| | `get_deposit_address(blockchain)` | Get deposit address |\n| | `get_withdrawals()` | Get withdrawal history |\n| | `request_withdrawal(...)` | Request withdrawal |\n| | `convert_dust(symbol)` | Convert dust to USDC |\n| | `get_withdrawal_delay()` | Get withdrawal delay |\n| | `create_withdrawal_delay(hours, token)` | Create withdrawal delay |\n| | `update_withdrawal_delay(hours, token)` | Update withdrawal delay |\n| **Orders** | `execute_order(...)` | Place single order |\n| | `execute_batch_orders(orders)` | Place batch orders |\n| | `get_users_open_orders(symbol)` | Get user's open orders |\n| | `get_open_orders(symbol)` | Get open orders |\n| | `cancel_open_order(symbol, orderId)` | Cancel single order |\n| | `cancel_open_orders(symbol)` | Cancel all orders |\n| **History** | `get_order_history(symbol)` | Get order history |\n| | `get_fill_history(symbol)` | Get fill history |\n| | `get_borrow_history()` | Get borrow history |\n| | `get_interest_history()` | Get interest history |\n| | `get_borrow_position_history()` | Get borrow positions |\n| | `get_funding_payments()` | Get funding payments |\n| | `get_settlement_history()` | Get settlements |\n| | `get_dust_history()` | Get dust conversions |\n| | `get_position_history()` | Get position history |\n| | `get_strategy_history()` | Get strategy history |\n| | `get_rfq_history()` | Get RFQ history |\n| | `get_quote_history()` | Get quote history |\n| | `get_rfq_fill_history()` | Get RFQ fills |\n| | `get_quote_fill_history()` | Get quote fills |\n| **Borrow/Lend** | `get_borrow_lend_positions()` | Get positions |\n| | `execute_borrow_lend(quantity, side, symbol)` | Borrow or lend |\n| | `get_estimated_liquidation_price(borrow)` | Get liquidation price |\n| **Positions** | `get_open_positions()` | Get open positions |\n| **RFQ** | `submit_rfq(symbol, side, quantity)` | Submit RFQ |\n| | `submit_quote(rfqId, price)` | Submit quote |\n| | `accept_quote(rfqId, quoteId)` | Accept quote |\n| | `refresh_rfq(rfqId)` | Refresh RFQ |\n| | `cancel_rfq(rfqId)` | Cancel RFQ |\n| **Strategy** | `create_strategy(...)` | Create strategy |\n| | `get_strategy(symbol, strategyId)` | Get strategy |\n| | `get_open_strategies()` | Get open strategies |\n| | `cancel_strategy(symbol, strategyId)` | Cancel strategy |\n| | `cancel_all_strategies(symbol)` | Cancel all strategies |\n\n### WebSocket Client\n\n```python\nfrom backpack_exchange_sdk import WebSocketClient\n\n# Public streams (no auth required)\nws = WebSocketClient()\n\n# Private streams (auth required)\nws = WebSocketClient(api_key=\"\u003cAPI_KEY\u003e\", secret_key=\"\u003cSECRET_KEY\u003e\")\n\n# Subscribe to streams\ndef on_message(data):\n    print(data)\n\nws.subscribe(\n    streams=[\"bookTicker.SOL_USDC\"],\n    callback=on_message\n)\n\n# Private stream example\nws.subscribe(\n    streams=[\"account.orderUpdate\"],\n    callback=on_message,\n    is_private=True\n)\n```\n\n## Available Enums\n\n```python\nfrom backpack_exchange_sdk.enums import (\n    # Order related\n    OrderType,          # Limit, Market\n    Side,               # Bid, Ask\n    TimeInForce,        # GTC, IOC, FOK\n    SelfTradePrevention,\n    TriggerBy,\n\n    # Market related\n    MarketType,         # Spot, Perp\n    FillType,\n    KlineInterval,\n\n    # Status related\n    OrderStatus,\n    DepositStatus,\n    WithdrawalStatus,\n\n    # And more...\n)\n```\n\n## Examples\n\nSee the [examples](./examples) directory for complete usage examples:\n\n- `example_public.py` - Public API examples\n- `example_authenticated.py` - Authenticated API examples\n- `example_websocket.py` - WebSocket streaming examples\n\n## Documentation\n\nFor detailed API documentation, visit the [Backpack Exchange API Docs](https://docs.backpack.exchange/).\n\n## Changelog\n\n### v1.1.0\n- Added 21 new API endpoints (RFQ, Strategy, Prediction Markets, etc.)\n- Added 25+ new enum types\n- Refactored SDK architecture using mixins\n- 100% API coverage (70 endpoints)\n- Full type hints support\n\n### v1.0.x\n- Initial release with basic API support\n\n## Support\n\nIf this SDK has been helpful, please consider:\n\n1. Using my referral link to register: [Register on Backpack Exchange](https://backpack.exchange/refer/solomeowl)\n2. Giving this repo a star on GitHub\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolomeowl%2Fbackpack_exchange_sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolomeowl%2Fbackpack_exchange_sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolomeowl%2Fbackpack_exchange_sdk/lists"}