• bitcoinBitcoin(BTC)$20,291.001.91%
  • ethereumEthereum(ETH)$1,356.080.68%
  • tetherTether(USDT)$1.000.27%
  • binancecoinBNB(BNB)$295.261.75%
  • usd-coinUSD Coin(USDC)$1.000.21%
  • rippleXRP(XRP)$0.4840114.74%
  • binance-usdBinance USD(BUSD)$1.000.12%
  • cardanoCardano(ADA)$0.4332950.08%
  • solanaSolana(SOL)$34.221.58%
  • dogecoinDogecoin(DOGE)$0.0652147.55%
Monday, January 30, 2023
Subscribe To Newsletter
Crypto News Bay
No Result
View All Result
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • GENERAL
    • ALTCOINS
    • ETHEREUM
    • CRYPTO EXCHANGES
    • CRYPTO MINING
  • BLOCKCHAIN
  • NFT
  • METAVERSE
  • WEB3
  • DEFI
  • ANALYSIS
  • SCAM ALERT
  • REGULATIONS
Crypto Market Cap
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • GENERAL
    • ALTCOINS
    • ETHEREUM
    • CRYPTO EXCHANGES
    • CRYPTO MINING
  • BLOCKCHAIN
  • NFT
  • METAVERSE
  • WEB3
  • DEFI
  • ANALYSIS
  • SCAM ALERT
  • REGULATIONS
No Result
View All Result
Crypto News Bay
No Result
View All Result
Home Altcoin

A Information to Automated Crypto Buying and selling With CEX.IO API Options

by Crypto News Bay
April 1, 2022
in Altcoin
Reading Time: 4 mins read
A A
0
Share on FacebookShare on Twitter


How you can place an order with the REST API

Here’s a pattern code that you should utilize to put automated bitcoin purchase orders on the CEX.IO REST API out of your terminal. To position completely different order sorts, simply alter the bottom and quote forex symbols (the primary line within the code under), together with the sort, quantity, and worth traces, in keeping with your particular wants.

 For instance, if you wish to generate automated promote orders for Ethereum at predefined portions and worth ranges sooner or later, simply sort “promote” on the sort line and enter your predetermined quantities and costs into the traces under. 

POST https://cex.io/api/place_order/{ETH}/{USD}

{

  “key”: “HLixH1aYdOIWOoRyoHkFpHlawrM”,

  “signature”: “0BDEDB9339DCE83D46F09A1527663762B52C8B12BCD1910E685BEAFEEABECFF9”,

  “nonce”: “1513175715”,

  “sort”: “purchase”,

  “quantity”: 12,

  “worth”: 3026.42

}

How you can place an order with the Websocket API

You can even place orders with the Websocket API just like the pattern code under. To vary your order parameters, it is advisable to alter the bottom and quote forex symbols below the pair line (BTC and USD symbols within the under pattern), together with the quantity, worth, and kind traces, in keeping with your particular requests:

{

  “e”: “place-order”,

  “information”: {

    “pair”: [

      “BTC”,

      “USD”

    ],

    “quantity”: 0.02,

    “worth”: “43002.7“,

    “sort”: “purchase”

  },

  “oid”: “1435927928274_7_place-order”

}

How you can examine your account stability with the WebSocket API

The pattern code under illustrates how one can obtain automated account stability messages with the WebSocket API. 

{

    “e”: “get-balance”,

    “information”: {},

    “oid”: “1435927928274_2_get-balance”

}

 

In response, the WebSocket API will return with a message that accommodates your balances for the completely different property in your CEX.IO account:

{

    “e”: “get-balance”,

    “information”: {

           “stability”: {

            ‘LTC’: ‘10.00000000’, 

            ‘USD’: ‘1024.00’,

            ‘EUR’: ‘217.53’, 

            ‘BTC’: ‘9.00000000’

        },

                 },

       “time”: 1435927928597

    “oid”: “1435927928274_2_get-balance”,

    “okay”: “okay”

}

How you can entry your order books with the WebSocket API 

Utilizing the WebSocket API, you possibly can subscribe to the order books of various cryptocurrency buying and selling pairs. Right here is how you are able to do it for the BTC/USD buying and selling pair:

 {

  “e”: “order-book-subscribe”,

  “information”: {

  “pair”: [

        “BTC”,

        “USD”

        ],

        “subscribe”: false,

        “depth”: -1

  },

  “oid”: “1435927928274_3_order-book-subscribe”

  }

You may examine your orders for different pairs by adjusting the bottom and quote currencies within the pair part within the above code.

 



Source link

Tags: APIAutomatedBitcoin NewsBitcoin price analysisCEXIOCryptoCrypto NewsCrypto News BayGuideLatest crypto updatesNFT newsSolutionsTrading
Share76Tweet47

Related Posts

OneCoin Founder Ruja Ignatova Is Again After 5 Years

by Crypto News Bay
January 30, 2023
0

Ruja Ignatova, the Founder and mastermind behind the OneCoin crypto fraud, allegedly resurfaced after vanishing for greater than 5 years....

Metaverse Mania Fades: Decentraland and The Sandbox Loses 95% Capitalization | by Paul Phoenix | The Capital | Jan, 2023

by Crypto News Bay
January 30, 2023
0

The Flickering Way forward for Decentralized Digital Actuality: Mass Adoption Stays Elusive Regardless of Apple’s EntrancePhotograph by UK Black Tech...

US Senator Centered on Crypto Cash Laundering Crackdown — Urges Congress, Regulators to Take Motion – Regulation Bitcoin Information

by Crypto News Bay
January 30, 2023
0

U.S. Senator Elizabeth Warren has referred to as on Congress to make sure regulators, such because the Securities and Change...

Knowledge Reveals 50% Of Bitcoin Hashrate Managed By Two Mining Swimming pools

by Crypto News Bay
January 29, 2023
0

Bitcoin hashrate is turning into extremely centralized, with a couple of mining swimming pools controlling a lot of the blockchain...

Ghanaian and Nigerian Central Financial institution Open Respective Regulatory Sandbox Utility Processes – Fintech Bitcoin Information

by Crypto News Bay
January 29, 2023
0

The Ghanaian and Nigerian central banks have invited monetary innovators that want to be included of their respective regulatory sandboxes...

Load More
  • Trending
  • Comments
  • Latest

XRP Ledger Modification Goes Stay, With out Ripple’s Approval

January 23, 2023

Why the Protection Inventory Sector is on the Rise | by Zoharks | The Capital | Jan, 2023

January 6, 2023

Most Necessary Options of Crypto Pockets

January 7, 2023

XR Predictions for 2023: Enterprise XR will Increase 💥

January 12, 2023

Filecoin lifting off

January 18, 2023

Jumio Helps Automotive-Sharing Firm GetGo Onboard New Drivers

January 11, 2023

OneCoin Founder Ruja Ignatova Is Again After 5 Years

January 30, 2023

Floki Inu DAO Passes Proposal to Burn Over $100M Value of Tokens

January 30, 2023

Bullish Break To $120 Nonetheless In Sight

January 30, 2023

Validators shut down as Secret Community struggles with management

January 30, 2023

US Senator’s Decision Encourages Capitol Reward Retailers to Settle for Cryptocurrency – Regulation Bitcoin Information

January 30, 2023

Metaverse Mania Fades: Decentraland and The Sandbox Loses 95% Capitalization | by Paul Phoenix | The Capital | Jan, 2023

January 30, 2023
Facebook Twitter LinkedIn Tumblr RSS
Crypto News Bay

Find the latest Bitcoin, Trending Crypto Updates, Altcoins, Blockchain, NFTs, Crypto Regulations, Interviews, Price Analysis, and more at Crypto News Bay

CATEGORIES

  • Altcoin
  • Analysis
  • Bitcoin
  • Blockchain
  • Crypto Exchanges
  • Crypto Mining
  • Crypto Updates
  • Decentralized Finance
  • Ethereum
  • Metaverse
  • NFT
  • Regulations
  • Scam Alert
  • Web3

SITE MAP

  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2022 - Crypto News Bay.
Crypto News Bay is not responsible for the content of external sites.

No Result
View All Result
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • GENERAL
    • ALTCOINS
    • ETHEREUM
    • CRYPTO EXCHANGES
    • CRYPTO MINING
  • BLOCKCHAIN
  • NFT
  • METAVERSE
  • WEB3
  • DEFI
  • ANALYSIS
  • SCAM ALERT
  • REGULATIONS

Copyright © 2022 - Crypto News Bay.
Crypto News Bay is not responsible for the content of external sites.