{ "info": { "author": "Kelvin Fichter", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "stockx-py-sdk\n=============\n\nStockx Python3 API Wrapper\n\nNotes\n-----\n\nThis is an *unofficial* StockX SDK for Python3. This project is\ncurrently *not* unit tested and is likely full of bugs. It not\nrecommended to use this SDK in production applications unless you really\nknow what you're doing. Pull requests, issues, and requests for features\nare welcome. SDK documentation will come as features are finished.\n\nThis SDK does *not* (currently) support accounts registered with\nFacebook or Twitter.\n\nPrerequisites\n-------------\n\nYou'll need to create an account on `StockX `__.\nPlease make sure to register with an email+password (*not* Facebook or\nTwitter) at the moment.\n\nBasic Usage\n-----------\n\n.. code:: python\n\n from stockxsdk import Stockx\n\n stockx = Stockx()\n\n email = 'YOUR_EMAIL'\n password = 'YOUR_PASSWORD'\n stockx.authenticate(email, password)\n\n product_id = stockx.get_first_product_id('BB1234')\n\n highest_bid = stockx.get_highest_bid(product_id)\n print(highest_bid.shoe_size, highest_bid.order_price)\n\n lowest_ask = stockx.get_lowest_ask(product_id)\n print(lowest_ask.shoe_size, lowest_ask.order_price)\n\nSDK Documentation\n-----------------\n\n``stockx.authenticate``\n~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.authenticate(email, password)\n\nAuthenticates the SDK to make requests on your behalf. You must\nauthenticate the SDK to retrieve info about your account or place new\nasks/bids.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Email for the account\n2. ``string`` - Password for the account\n\nReturns\n^^^^^^^\n\n``bool`` Success of the login operation\n\nExample\n^^^^^^^\n\n.. code:: python\n\n email = 'example@test.com'\n password = 'example123'\n logged_in = stockx.authenticate(email, password)\n print(logged_in) # `True`, hopefully\n\n``stockx.me``\n~~~~~~~~~~~~~\n\n::\n\n stock.me()\n\nReturns information about your account.\n\nParameters\n^^^^^^^^^^\n\nnone\n\nReturns\n^^^^^^^\n\n``Object`` - Account info as a JSON object\n\nExample\n^^^^^^^\n\n.. code:: python\n\n me = stock.me()\n print(me) # some huge JSON object\n\n``stockx.selling``\n~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.selling()\n\nReturns information about what you're currently selling (asks, pending,\nsold).\n\nParameters\n^^^^^^^^^^\n\nnone\n\nReturns\n^^^^^^^\n\n``list`` - A list of StockxItem objects\n\nExample\n^^^^^^^\n\n.. code:: python\n\n selling = stockx.selling()\n for item in selling:\n print(item.item_type, item.item_id, item.item_price)\n\n``stockx.buying``\n~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.buying()\n\nReturns information about what you're currently buying (bids, pending,\nbought).\n\nParameters\n^^^^^^^^^^\n\nnone\n\nReturns\n^^^^^^^\n\n``list`` - A list of StockxItem objects\n\nExample\n^^^^^^^\n\n.. code:: python\n\n buying = stockx.buying()\n for item in buying:\n print(item.item_type, item.item_id, item.item_price)\n\n``stockx.rewards``\n~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.rewards()\n\nReturns information about your seller level as a JSON object\n\nParameters\n^^^^^^^^^^\n\nnone\n\nReturns\n^^^^^^^\n\n``Object`` - Seller level info as a JSON object\n\nExample\n^^^^^^^\n\n.. code:: python\n\n rewards = stockx.rewards()\n print(rewards) # some JSON object\n\n``stockx.stats``\n~~~~~~~~~~~~~~~~\n\n::\n\n stockx.stats()\n\nReturns statistics about your collection as a JSON object\n\nParameters\n^^^^^^^^^^\n\nnone\n\nReturns\n^^^^^^^\n\n``Object`` - User stats as a JSON object\n\nExample\n^^^^^^^\n\n.. code:: python\n\n stats = stockx.stats()\n print(stats) # some JSON object\n\n``stockx.cop_list``\n~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.cop_list()\n\nReturns your current cop list as a list of StockxItem objects\n\nParameters\n^^^^^^^^^^\n\nnone\n\nReturns\n^^^^^^^\n\n``List`` - Current coplist as list of StockxItem objects\n\nExample\n^^^^^^^\n\n.. code:: python\n\n cop_list = stockx.cop_list()\n for item in cop_list:\n print(item.item_type, item.item_id, item.item_price)\n\n``stockx.add_product_to_follow``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.add_product_to_follow(product_id)\n\nAdds a new product to your cop list. ``product_id`` *must* be the ID of\na specific size.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Product ID of product to follow\n\nReturns\n^^^^^^^\n\n``bool`` - Success of the operation\n\nExample\n^^^^^^^\n\n.. code:: python\n\n size_id = '36f86e69-9d4f-4b82-94a2-d85b4e7fd370'\n followed = stockx.add_product_to_follow(size_id)\n print(followed) # True, hopefully\n\n``stockx.add_product_to_portfolio``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.add_product_to_portfolio(product_id, purchase_price, condition='new', purchase_date=None)\n\nAdds a new product to your portfolio. ``purchase_date`` is a standard\n``YYYY-MM-DD`` string and defaults to today's date. ``condition`` is one\nof: ``new``, ``9.5``, ``9``, ``8.5``, ``8``, ``7``, ``6``, ``5``, ``4``,\n``3``, ``2``, ``1`` and defaults to ``new``.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Product ID of product to add to portfolio\n2. ``number`` - Price of product at purchase\n3. ``string`` - Condition of product\n4. ``string`` - Purchase date of product\n\nReturns\n^^^^^^^\n\n``bool`` - Success of the operation\n\nExample\n^^^^^^^\n\n.. code:: python\n\n size_id = '36f86e69-9d4f-4b82-94a2-d85b4e7fd370'\n added = stockx.add_product_to_collection(size_id)\n print(added) # True, hopefully\n\n``stockx.get_product``\n~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.get_product(product_id)\n\nReturns the full StockX product object given a StockX product id\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Product ID of product to get\n\nReturns\n^^^^^^^\n\n``StockxProduct`` - The product with that ID\n\nExample\n^^^^^^^\n\n.. code:: python\n\n product_id = '2c91a3dc-4ba6-40bc-af0b-a259f793a223'\n product = stockx.get_product(product_id)\n print(product.title) # 'Adidas EQT Support 93/17 Core Black Turbo'\n\n``stockx.get_asks``\n~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.get_asks(product_id)\n\nReturns a list of all 'Ask' ``StockxOrder`` objects for a given product\nID\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Product ID\n\nReturns\n^^^^^^^\n\n``List`` - List of 'Ask' ``StockxOrder`` objects\n\nExample\n^^^^^^^\n\n.. code:: python\n\n product_id = '2c91a3dc-4ba6-40bc-af0b-a259f793a223'\n asks = stockx.get_asks(product_id)\n for ask in asks:\n print(ask.shoe_size, ask.order_price)\n\n``stockx.get_lowest_ask``\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.get_lowest_ask(product_id)\n\nReturns the lowest ask for a given product as a ``StockxOrder`` object\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Product ID\n\nReturns\n^^^^^^^\n\n``StockxOrder`` - Lowest ask as a ``StockxOrder``\n\nExample\n^^^^^^^\n\n.. code:: python\n\n product_id = '2c91a3dc-4ba6-40bc-af0b-a259f793a223'\n lowest_ask = stockx.get_lowest_ask(product_id)\n print(ask.shoe_size, ask.order_price)\n\n``stockx.get_bids``\n~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.get_bids(product_id)\n\nReturns a list of all 'Bid' ``StockxOrder`` objects for a given product\nID\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Product ID\n\nReturns\n^^^^^^^\n\n``List`` - List of 'Bid' ``StockxOrder`` objects\n\nExample\n^^^^^^^\n\n.. code:: python\n\n product_id = '2c91a3dc-4ba6-40bc-af0b-a259f793a223'\n bids = stockx.get_bids(product_id)\n for bid in bids:\n print(bid.shoe_size, bid.order_price)\n\n``stockx.get_highest_bid``\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.get_highest_bid(product_id)\n\nReturns the highest bid for a given product as a ``StockxOrder`` object\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Product ID\n\nReturns\n^^^^^^^\n\n``StockxOrder`` - highest bid as a ``StockxOrder``\n\nExample\n^^^^^^^\n\n.. code:: python\n\n product_id = '2c91a3dc-4ba6-40bc-af0b-a259f793a223'\n highest_bid = stockx.get_highest_bid(product_id)\n print(bid.shoe_size, bid.order_price)\n\n``stockx.create_ask``\n~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.create_ask(product_id, price, expiry_date=None)\n\nCreates a new ask for a product at a given price to expire at a given\ndate. Expiry date is a standard ``YYYY-MM-DD`` string and defaults to\nnow+30 days.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Product ID\n2. ``number`` - Price in USD\n3. ``expiry_date`` - Ask expiry date; defaults to now+30 days\n\nReturns\n^^^^^^^\n\n``string`` - Ask ID\n\nExample\n^^^^^^^\n\n.. code:: python\n\n size_id = '36f86e69-9d4f-4b82-94a2-d85b4e7fd370'\n ask_id = stockx.create_ask(size_id, 300)\n print(ask_id) # Some string\n\n``stockx.update_ask``\n~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.update_ask(ask_id, new_price, expiry_date=None)\n\nUpdates an ask for a product at a given price to expire at a given date.\nExpiry date is a standard ``YYYY-MM-DD`` string and defaults to now+30\ndays. ``ask_id`` is the ``item_id`` for that ask returned by\n``stockx.selling()``.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Ask ID\n2. ``number`` - New price for the ask\n3. ``expiry_date`` - Ask expiry date, defaults to now+30 days\n\nReturns\n^^^^^^^\n\n``bool`` - Success of the operation\n\nExample\n^^^^^^^\n\n.. code:: python\n\n ask_id = '12489999967982049999'\n updated = stockx.update_ask(ask_id, 400)\n print(updated) # True, hopefully\n\n``stockx.cancel_ask``\n~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.cancel_ask(ask_id)\n\nCancels an ask for a product. ``ask_id`` is the ``item_id`` for that ask\nreturned by ``stockx.buying()``.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Ask ID\n\nReturns\n^^^^^^^\n\n``bool`` - Success of the operation\n\nExample\n^^^^^^^\n\n.. code:: python\n\n ask_id = '12489999967982049999'\n cancelled = stockx.cancel_ask(ask_id)\n print(cancelled) # True, hopefully\n\n``stockx.create_bid``\n~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.create_bid(product_id, price, expiry_date)\n\nCreates a new bid for a product at a given price to expire at a given\ndate. Expiry date is a standard ``YYYY-MM-DD`` string and defaults to\nnow+30 days.\n\nParameters\n^^^^^^^^^^\n\n``string`` - Product ID ``number`` - Price in USD ``expiry_date`` - Bid\nexpiry date, defaults to now+30 days\n\nReturns\n^^^^^^^\n\n``string`` - Bid ID\n\nExample\n^^^^^^^\n\n.. code:: python\n\n size_id = '36f86e69-9d4f-4b82-94a2-d85b4e7fd370'\n bid_id = stockx.create_bid(size_id, 300)\n print(bid_id) # Some string\n\n``stockx.update_bid``\n~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.update_bid(bid_id, new_price, expiry_date=None)\n\nUpdates an bid for a product at a given price to expire at a given date.\nExpiry date is a standard ``YYYY-MM-DD`` string and defaults to now+30\ndays. ``bid_id`` is the ``item_id`` for that bid returned by\n``stockx.buying()``.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Bid ID\n2. ``number`` - New price for the bid\n3. ``expiry_date`` - Bid expiry date, defaults to now+30 days\n\nReturns\n^^^^^^^\n\n``bool`` - Success of the operation\n\nExample\n^^^^^^^\n\n.. code:: python\n\n bid_id = '12489999967982049999'\n updated = stockx.update_bid(bid_id, 400)\n print(updated) # True, hopefully\n\n``stockx.cancel_bid``\n~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.cancel_bid(bid_id)\n\nCancels an bid for a product. ``bid_id`` is the ``item_id`` for that bid\nreturned by ``stockx.selling()``.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Bid ID\n\nReturns\n^^^^^^^\n\n``bool`` - Success of the operation\n\nExample\n^^^^^^^\n\n.. code:: python\n\n bid_id = '12489999967982049999'\n cancelled = stockx.cancel_bid(bid_id)\n print(cancelled) # True, hopefully\n\n``stockx.search``\n~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.search(query)\n\nSearches StockX for a given query. Returns the first 20 matches.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - The query to search for\n\nReturns\n^^^^^^^\n\n``List`` - A list of JSON response objects\n\nExample\n^^^^^^^\n\n.. code:: python\n\n hits = stockx.search('BB1234')\n for hit in hits:\n print(hit) # Some huge JSON object\n\n``stockx.get_first_product_id``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n stockx.get_first_product_id(query)\n\nReturns the first product ID for a given query.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - The query to search for\n\nReturns\n^^^^^^^\n\n``string`` - ID of the first product returned\n\nExample\n^^^^^^^\n\n.. code:: python\n\n product_id = stockx.get_first_product_id('BB1234')\n print(product_id) # '2c91a3dc-4ba6-40bc-af0b-a259f793a223'\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kfichter/stockx-py-sdk", "keywords": "stockx development", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "stockx-py-sdk", "package_url": "https://pypi.org/project/stockx-py-sdk/", "platform": "", "project_url": "https://pypi.org/project/stockx-py-sdk/", "project_urls": { "Homepage": "https://github.com/kfichter/stockx-py-sdk" }, "release_url": "https://pypi.org/project/stockx-py-sdk/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "StockX Python3 API Wrapper", "version": "0.0.2" }, "last_serial": 3143592, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "0df1926b1ec0cd1755709cee087f1e48", "sha256": "de2bf7b125b038cb71ce160e8c3869583c7996f30a6d7be53f6d023fe8ec4c35" }, "downloads": -1, "filename": "stockx-py-sdk-0.0.2.tar.gz", "has_sig": false, "md5_digest": "0df1926b1ec0cd1755709cee087f1e48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8082, "upload_time": "2017-09-02T20:43:06", "url": "https://files.pythonhosted.org/packages/e6/49/e7316cae6626327c44b12703460541b9312b3fb2946a2a9e30823a3130a4/stockx-py-sdk-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0df1926b1ec0cd1755709cee087f1e48", "sha256": "de2bf7b125b038cb71ce160e8c3869583c7996f30a6d7be53f6d023fe8ec4c35" }, "downloads": -1, "filename": "stockx-py-sdk-0.0.2.tar.gz", "has_sig": false, "md5_digest": "0df1926b1ec0cd1755709cee087f1e48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8082, "upload_time": "2017-09-02T20:43:06", "url": "https://files.pythonhosted.org/packages/e6/49/e7316cae6626327c44b12703460541b9312b3fb2946a2a9e30823a3130a4/stockx-py-sdk-0.0.2.tar.gz" } ] }