Skip to content

ff137/luno_openapi

Repository files navigation

luno-openapi

The Luno API provides developers with a wealth of financial information provided through the Luno platform. Through this secure system developers can:

  • Create accounts for trading in cryptocurrencies
  • Access current and historic cryptocurrency market data
  • Submit trade orders and view order status
  • Buy and sell Bitcoin and Ethereum
  • Send and receive Bitcoin and Ethereum
  • Generate Bitcoin and Ethereum wallet addresses

The Luno API brings the world of Bitcoin and Ethereum to your doorstep.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.2.5
  • Package version: 1.2.5
  • Generator version: 7.8.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements

Python 3.8+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/ff137/luno_openapi.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/ff137/luno_openapi.git)

Then import the package:

import luno_openapi

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import luno_openapi

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import luno_openapi
from luno_openapi.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.luno.com
# See configuration.py for a list of all supported configuration parameters.
configuration = luno_openapi.Configuration(
    host = "https://api.luno.com"
)



# Enter a context with an instance of the API client
async with luno_openapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = luno_openapi.AccountsApi(api_client)
    currency = 'XBT' # str | The currency code for the Account you want to create.  Please see the Currency section for a detailed list of currencies supported by the Luno platform.  Users must be verified to trade currency in order to be able to create an Account.  For more information on the verification process, please see <a href=\"/help/en/articles/1000168396\">How do I verify my identity?</a>.  Users have a limit of 10 accounts per currency.
    name = 'Trading ACC' # str | The label to use for this account

    try:
        # Create account
        api_response = await api_instance.create_account(currency, name)
        print("The response of AccountsApi->create_account:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AccountsApi->create_account: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.luno.com

Class Method HTTP request Description
AccountsApi create_account POST /api/1/accounts Create account
AccountsApi get_balances GET /api/1/balance List account balances
AccountsApi get_move GET /api/exchange/1/move Move
AccountsApi list_moves GET /api/exchange/1/move/list_moves List Moves
AccountsApi list_pending_transactions GET /api/1/accounts/{id}/pending List pending transactions
AccountsApi list_transactions GET /api/1/accounts/{id}/transactions List transactions
AccountsApi move POST /api/exchange/1/move Move
AccountsApi update_account_name PUT /api/1/accounts/{id}/name Update Account Name
AddressApi validate POST /api/1/address/validate Validate
BeneficiariesApi create_beneficiary POST /api/1/beneficiaries Create beneficiary
BeneficiariesApi delete_beneficiary DELETE /api/1/beneficiaries/{id} Delete beneficiary
BeneficiariesApi list_beneficiaries GET /api/1/beneficiaries List beneficiaries
MarketApi get_candles GET /api/exchange/1/candles Get candles
MarketApi get_order_book GET /api/1/orderbook_top Get top order book
MarketApi get_order_book_full GET /api/1/orderbook Get full order book
MarketApi get_ticker GET /api/1/ticker Get ticker for currency pair
MarketApi get_tickers GET /api/1/tickers List tickers for all currency pairs
MarketApi list_trades GET /api/1/trades List recent trades
MarketApi markets GET /api/exchange/1/markets Get markets info
OrdersApi get_fee_info GET /api/1/fee_info Get fee information
OrdersApi get_order GET /api/1/orders/{id} Get order
OrdersApi get_order_v2 GET /api/exchange/2/orders/{id} Get Order v2
OrdersApi get_order_v3 GET /api/exchange/3/order Get Order v3
OrdersApi list_orders GET /api/1/listorders List orders
OrdersApi list_orders_v2 GET /api/exchange/2/listorders List Orders v2
OrdersApi list_user_trades GET /api/1/listtrades List trades
OrdersApi post_limit_order POST /api/1/postorder Post Limit Order
OrdersApi post_market_order POST /api/1/marketorder Post Market Order
OrdersApi stop_order POST /api/1/stoporder Cancel Order
ReceiveApi create_funding_address POST /api/1/funding_address Create receive address
ReceiveApi get_funding_address GET /api/1/funding_address Get receive address
SendApi send POST /api/1/send Send
SendApi send_fee GET /api/1/send_fee Estimate send fees
TransfersApi cancel_withdrawal DELETE /api/1/withdrawals/{id} Cancel withdrawal request
TransfersApi create_withdrawal POST /api/1/withdrawals Request a withdrawal
TransfersApi get_withdrawal GET /api/1/withdrawals/{id} Get withdrawal request
TransfersApi list_transfers GET /api/exchange/1/transfers List transfers
TransfersApi list_withdrawals GET /api/1/withdrawals List withdrawal requests

Documentation For Models

About

Luno OpenAPI generated python asyncio client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published