/dex-api-python

dex api sdk for python

Primary LanguagePython

dex-api-python

A REST interface for state queries, transaction generation and broadcasting.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 3.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

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

Then import the package:

import dex_api_python 

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 dex_api_python

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import dex_api_python
from dex_api_python.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = dex_api_python.AliasApi(dex_api_python.ApiClient(configuration))
alias = 'superman' # str | The alias to be queried

try:
    # Given an alias, query the corresponding address
    api_response = api_instance.get_address_from_alias(alias)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AliasApi->get_address_from_alias: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://dex-api.coinex.org

Class Method HTTP request Description
AliasApi get_address_from_alias GET /alias/address-of-alias/{alias} Given an alias, query the corresponding address
AliasApi get_alias_params GET /alias/parameters Get the current alias parameters
AliasApi get_aliases_from_address GET /alias/aliases-of-address/{address} Given an account's address, query all the corresponding aliases
AliasApi update_alias POST /alias/update Add or remove alias for an address
AssetApi add_whitelist POST /asset/tokens/{symbol}/forbidden/whitelist Add forbid whitelist
AssetApi burn_token POST /asset/tokens/{symbol}/burns Burn token
AssetApi forbid_addr POST /asset/tokens/{symbol}/forbidden/addresses Forbid address
AssetApi forbid_token POST /asset/tokens/{symbol}/forbids Forbid token
AssetApi get_asset_params GET /asset/parameters Get the current asset parameters
AssetApi get_forbidden_addresses GET /asset/tokens/{symbol}/forbidden/addresses query forbidden addresses
AssetApi get_reserved_symbols GET /asset/tokens/reserved/symbols List reserved symbols
AssetApi get_token GET /asset/tokens/{symbol} queryToken
AssetApi get_token_list GET /asset/tokens List tokens
AssetApi get_whitelist GET /asset/tokens/{symbol}/forbidden/whitelist queryWhitelist
AssetApi issue_token POST /asset/tokens Issue token
AssetApi mint_token POST /asset/tokens/{symbol}/mints Mint token
AssetApi modify_token_info POST /asset/tokens/{symbol}/infos Modify token info
AssetApi remove_whitelist POST /asset/tokens/{symbol}/unforbidden/whitelist Remove forbid whitelist
AssetApi transfer_ownership POST /asset/tokens/{symbol}/ownerships Transfer ownership
AssetApi un_forbid_addr POST /asset/tokens/{symbol}/unforbidden/addresses UnForbid address
AssetApi un_frobid_token POST /asset/tokens/{symbol}/unforbids UnForbid token
AuthApi get_account GET /auth/accounts/{address} Get the account information on blockchain
AuthApi get_auth_params GET /auth/parameters Get the current auth parameters
AuthApi set_referee POST /auth/accounts/{address}/referee Set referee for account
BancorApi query_bancor_deal GET /bancorlite/deals Query bancor market deal
BancorliteApi bancor_cancel POST /bancorlite/bancor-cancel cancel bancor
BancorliteApi bancor_init POST /bancorlite/bancor-init create bancor
BancorliteApi bancor_trade POST /bancorlite/bancor-trade trade with bancor
BancorliteApi get_bancor_info GET /bancorlite/pools/{symbol} get the bancor pool info
BancorliteApi get_bancor_infos GET /bancorlite/infos get all bancor infos
BancorliteApi get_bancorlite_params GET /bancorlite/parameters Get the current bancorlite parameters
BankApi get_address_balances GET /bank/balances/{address} Get the account balances
BankApi get_bank_params GET /bank/parameters Get the current bankx parameters
BankApi send_coins POST /bank/accounts/{address}/transfers Send coins from one account to another
BankApi set_memo_required POST /bank/accounts/memo Mark if memo is required to receive coins
BankApi transfer_supervised_coins POST /bank/accounts/{address}/supervised_transfers Operate a supervised transfer
CommentApi followup_comment POST /comment/followup-comment Post a follow-up comment under some thread
CommentApi new_thread POST /comment/new-thread Post a new comment to open a new thread
CommentApi query_comment GET /comment/comments Query token comment
CommentApi reward_comments POST /comment/reward-comments reward some comments with coins
DistributionApi donate_to_community_pool POST /distribution/{accAddress}/donates Donate to the community pool
DistributionApi get_all_rewards GET /distribution/delegators/{delegatorAddr}/rewards Get the total rewards balance from all delegations
DistributionApi get_community_pool GET /distribution/community_pool Community pool parameters
DistributionApi get_distribution_info GET /distribution/validators/{validatorAddr} Validator distribution information
DistributionApi get_distribution_params GET /distribution/parameters Fee distribution parameters
DistributionApi get_outstanding_rewards GET /distribution/validators/{validatorAddr}/outstanding_rewards Fee distribution outstanding rewards of a single validator
DistributionApi get_reward_by_validator GET /distribution/delegators/{delegatorAddr}/rewards/{validatorAddr} Query a delegation reward
DistributionApi get_validator_rewards GET /distribution/validators/{validatorAddr}/rewards Commission and self-delegation rewards of a single validator
DistributionApi get_withdraw_address GET /distribution/delegators/{delegatorAddr}/withdraw_address Get the rewards withdrawal address
DistributionApi set_withdraw_address POST /distribution/delegators/{delegatorAddr}/withdraw_address Replace the rewards withdrawal address
DistributionApi withdraw_all_rewards POST /distribution/delegators/{delegatorAddr}/rewards Withdraw all the delegator's delegation rewards
DistributionApi withdraw_all_validator_rewards POST /distribution/validators/{validatorAddr}/rewards Withdraw the validator's rewards
DistributionApi withdraw_rewards_by_validator POST /distribution/delegators/{delegatorAddr}/rewards/{validatorAddr} Withdraw a delegation reward
ExpiryApi query_redelegation GET /expiry/redelegations Query redelegation
ExpiryApi query_unbonding GET /expiry/unbondings Query Unbonding
ExpiryApi query_unlock GET /expiry/unlocks Query Unlock
ExpiryApi querylocked GET /expiry/lockeds Query lock tx
GovernanceApi deposit_to_proposal POST /gov/proposals/{proposalId}/deposits Deposit tokens to a proposal
GovernanceApi get_deposit_by_addr GET /gov/proposals/{proposalId}/deposits/{depositor} Query deposit
GovernanceApi get_deposit_parameters GET /gov/parameters/deposit Query governance deposit parameters
GovernanceApi get_deposits GET /gov/proposals/{proposalId}/deposits Query deposits
GovernanceApi get_proposal_by_id GET /gov/proposals/{proposalId} Query a proposal
GovernanceApi get_proposals GET /gov/proposals Query proposals
GovernanceApi get_proposer GET /gov/proposals/{proposalId}/proposer Query proposer
GovernanceApi get_tally GET /gov/proposals/{proposalId}/tally Get a proposal's tally result at the current time
GovernanceApi get_tallying_parameters GET /gov/parameters/tallying Query governance tally parameters
GovernanceApi get_voter_by_addr GET /gov/proposals/{proposalId}/votes/{voter} Query vote
GovernanceApi get_voters GET /gov/proposals/{proposalId}/votes Query voters
GovernanceApi get_voting_parameters GET /gov/parameters/voting Query governance voting parameters
GovernanceApi submit_community_pool_spend_proposal POST /gov/proposals/community_pool_spend Generate a community pool spend proposal transaction
GovernanceApi submit_parameter_change_proposal POST /gov/proposals/param_change Generate a parameter change proposal transaction
GovernanceApi submit_proposal POST /gov/proposals Submit a proposal
GovernanceApi vote_proposal POST /gov/proposals/{proposalId}/votes Vote a proposal
IncentiveApi get_incentive_params GET /incentive/parameters Get the current incentive parameters
MarketApi cancel_order POST /market/cancel-order Cancel the order
MarketApi cancel_trading_pair POST /market/cancel-trading-pair Cancel the trading-pair
MarketApi create_gte_order POST /market/gte-orders Create GTE order in blockchain
MarketApi create_ioc_order POST /market/ioc-orders Create IOC order in blockchain
MarketApi create_trading_pair POST /market/trading-pairs Create trading-pair in blockchain
MarketApi get_market_params GET /market/parameters Get the current market parameters
MarketApi get_order GET /market/orders/{order-id} Query order info
MarketApi get_orders GET /market/orders/account/{address} Query user order-id list
MarketApi get_orders_in_market GET /market/orderbook/{stock}/{money} Query trading-pair's orderbook
MarketApi get_trading_pair GET /market/trading-pairs/{stock}/{money} Query trading-pair info
MarketApi modify_price_precision POST /market/price-precision Modify the price precision of the trading pair in the dex
MarketApi query_candle_stick GET /market/candle-sticks Query market candleStick
MarketApi query_deal GET /market/deals Query market deal
MarketApi query_depth GET /market/depths Query market depth
MarketApi query_order GET /market/user-orders Query account's order
MarketApi query_tickers GET /market/tickers Query market tickers
MarketApi query_trading_pairs GET /market/exist-trading-pairs Query all trading-pair infos in blockchain
MiscApi query_block_times GET /misc/block-times Query block time
MiscApi query_donation GET /misc/donations Query donations info
MiscApi query_last_block GET /misc/height Query least block info
SlashApi query_slash GET /slash/slashings Query validator slash info
SlashingApi get_signing_info GET /slashing/validators/{validatorPubKey}/signing_info Get sign info of given validator
SlashingApi get_signing_infos GET /slashing/signing_infos Get sign info of given all validators
SlashingApi get_slashing_params GET /slashing/parameters Get the current slashing parameters
SlashingApi unjail_validator POST /slashing/validators/{validatorAddr}/unjail Unjail a jailed validator
StakingApi get_delegations GET /staking/delegators/{delegatorAddr}/delegations Get all delegations from a delegator
StakingApi get_delegations_of_validator GET /staking/validators/{validatorAddr}/delegations Get all delegations from a validator
StakingApi get_delegations_to_validator GET /staking/delegators/{delegatorAddr}/delegations/{validatorAddr} Query the current delegation between a delegator and a validator
StakingApi get_delegator_txs GET /staking/delegators/{delegatorAddr}/txs Get all staking txs (i.e msgs) from a delegator
StakingApi get_redelegations GET /staking/redelegations Get all redelegations (filter by query params)
StakingApi get_staking_parameters GET /staking/parameters Get the current staking parameter values
StakingApi get_staking_pool GET /staking/pool Get the current state of the staking pool
StakingApi get_undelegations_between GET /staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr} Query all unbonding delegations between a delegator and a validator
StakingApi get_undelegations_of_delegator GET /staking/delegators/{delegatorAddr}/unbonding_delegations Get all unbonding delegations from a delegator
StakingApi get_undelegations_of_validator GET /staking/validators/{validatorAddr}/unbonding_delegations Get all unbonding delegations from a validator
StakingApi get_validator GET /staking/validators/{validatorAddr} Query the information from a single validator
StakingApi get_validator_of_delegator GET /staking/delegators/{delegatorAddr}/validators/{validatorAddr} Query a validator that a delegator is bonded to
StakingApi get_validators GET /staking/validators Get all validator candidates. By default it returns only the bonded validators.
StakingApi get_validators_of_delegator GET /staking/delegators/{delegatorAddr}/validators Query all validators that a delegator is bonded to
StakingApi submit_delegation POST /staking/delegators/{delegatorAddr}/delegations Submit delegation
StakingApi submit_redelegation POST /staking/delegators/{delegatorAddr}/redelegations Submit a redelegation
StakingApi undelegate POST /staking/delegators/{delegatorAddr}/unbonding_delegations Submit an unbonding delegation
TendermintApi get_block GET /blocks/{height} Get a block at a certain height
TendermintApi get_latest_block GET /blocks/latest Get the latest block
TendermintApi get_latest_validator_set GET /validatorsets/latest Get the latest validator set
TendermintApi get_node_info GET /node_info The properties of the connected node
TendermintApi get_syncing GET /syncing Syncing state of node
TendermintApi get_validator_set GET /validatorsets/{height} Get a validator set a certain height
TransactionsApi broadcast_tx POST /txs Broadcast a signed tx
TransactionsApi encode_tx POST /txs/encode Encode a transaction to the Amino wire format
TransactionsApi get_tx_by_hash GET /txs/{hash} Get a Tx by hash
TransactionsApi search_tx GET /txs Search transactions
TxApi get_tx_from_trade_server GET /tx/txs/{hash} Get a Tx from trade server by hash
TxApi query_income GET /tx/incomes Query account all income until to given time
TxApi query_tx GET /tx/txs Query transactions

Documentation For Models

Documentation For Authorization

kms

  • Type: HTTP basic authentication

Author