Giter Club home page Giter Club logo

southxchange's Introduction

Buy me a coffee โ˜•๏ธŽ

Southxchange is a cryptocurrency broker that does not require KYC trading is accepted with Lightning, with this library you can interact with the platform.

Market

  • List Orders
  • Place Order
  • Cancel Order
  • Cancel Orders

Wallets

  • Generate Address
  • Withdraw
  • Balances
  • Transactions List

Markets

  • List Markets
  • Price
  • Prices
  • Book
  • Trades
  • History

Instalation

(Southxchange) requires Python v3.8
$ pip install Southxchange

Getting Started

Python 3.8.3 (default, Jun 16 2020, 19:00:28)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import Southxchange
>>>
>>> Southxchange.Southxchange('Private', 'Secret') # Entering credentials.

Market

>>> Market = Southxchange.Market()
  • Places an order in a given market.
>>> Market.placeorder('DOGE', 'BTC', amount=1, type='BUY', limitprice='0.00000001') # Place Order.
{'error' : False, 'message' : 'Created order.', 'orderid' : 123456}
  • Cancels a given order.
>>> Market.cancelorder(123456) # Cancel Order.
{'error' : False, 'message' : 'Cancel order.', 'orderid' : 123456}
  • Cancels a given order.
>>> Market.cancelorders('BTC', 'DOGE') # Cancel Orders
{'error' : False, 'message' : 'Cancel orders.'}
  • Lists all pending orders.
>>> Market.listorders() # List Orders.
[{'Code': '132541', 'Type': 'buy', 'Amount': 1.0, 'OriginalAmount': 1.0, 'LimitPrice': 1e-08, 'ListingCurrency': 'DOGE', 'ReferenceCurrency': 'BTC'}]

Wallets

>>> Wallets = Southxchange.Wallets()
  • Generates a new address for a given cryptocurrency.
>>> Wallets.newaddress('BTC') # New Address.
{'error': False, 'message': 'New address generated.', 'address': '3G983JSIM ...'}
  • Lists balances for all currencies.
>>> Wallets.balances() # List Balances.
[{"Currency":"BTC","Deposited": 1 ,"Available": 1, "Unconfirmed": 5}]
  • List all transactions.
>>> Wallets.transactions('BTC', type='transactions', pageindex=1, pagesize=50) # List History Transactions.
{'TotalElements': 50, 'Result': [{...} ...] ...}
  • Withdraws to a given address.
>>> Wallets.withdraw('BBP', 'BPHoq ...', amount='2') # Withdraw
{'error': False, 'message': '', ...}

Markets

>>> Markets = Southxchange.Markets()
  • Lists all markets
>>> Markets.listmarkets()
[['DASH', 'BTC'] ...]
  • Gets price of a given market
>>> Markets.price('ltc', 'btc')
{'Bid': 0.00454897, 'Ask': 0.004590561, 'Last': 0.004599999, 'Variation24Hr': 0.27, 'Volume24Hr': 34.04216098}
  • Lists prices of all markets
>>> Markets.prices()
[{'Market': 'DASH/BTC', 'Bid': 0.007663185, 'Ask': 0.007716761, 'Last': 0.007727174, 'Variation24Hr': 3.73, 'Volume24Hr': 32.97202091} ...]
  • Lists order book of a given market
>>> Markets.book('ltc', 'btc')
{'BuyOrders': [{'Index': 0, 'Amount': 8.0, 'Price': 0.004562066} ... ]}
  • Lists latest trades in a given market
>>> Markets.trades('ltc','btc')
[{'At': 1592996087, 'Amount': 0.00149447, 'Price': 0.004599999, 'Type': 'buy'} ...]
  • List market history between two dates
>>> Markets.history('ltc', 'btc', 1514775600000, 1517367600000, periods=100)
[{'At': 1592996087, 'Amount': 0.00149447, 'Price': 0.004599999, 'Type': 'buy'} ... ]
Field Description
start Start date in milliseconds from January 1, 1970
end End date in milliseconds from January 1, 1970
periods Number of periods to get (Optional: defaults to 100)

southxchange's People

Contributors

zenitsudeck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.