Use beempy to access the internal HIVE/HBD market

in #hive5 years ago

image.png
source
Although not visible, the internal market is already working and HBD can be exchanged for HIVE.

Prepare beempy

You need to have an up to date beem version 0.22.8

beempy updatenodes --hive
beempy currentnode

should return now

+----------+-----------------------+
| Key      | Value                 |
+----------+-----------------------+
| Node-Url | https://api.hive.blog |
| Version  | 0.23.0                |
| HIVE     | True                  |
+----------+-----------------------+

Check the orderbook

beempy orderbook --chart
            Orderbook

    1701.93 $ 1595.59 $  ┼╮
    1489.25 $  ┤╰─╮                      ┊
    1382.90 $  ┤  ╰─╮                    ┊               ╭───────
    1276.56 $  ┤    ╰╮                   ┊          ╭────╯
    1170.22 $  ┤     ╰───╮               ┊         ╭╯
    1063.87 $  ┤         ╰╮              ┊         │
     957.53 $  ┤          │              ┊         │
     851.19 $  ┤          │              ┊       ╭─╯
     744.84 $  ┤          │              ┊       │
     638.50 $  ┤          │              ┊     ╭─╯
     532.16 $  ┤          │              ┊    ╭╯
     425.81 $  ┤          ╰─────╮        ┊    │
     319.47 $  ┤                ╰────╮   ┊   ╭╯
     213.12 $  ┤                     ╰─╮ ┊   │
     106.78 $  ┤                       ╰╮┊   │
       0.44 $  ┤                        ╰────╯

and

 beempy tradehistory

returns the last trades as plot

     Trade history 2020-03-17T20:26:22 - 2020-03-24T20:26:22

HIVE/HBD
  0.32  
  0.31                   ╭╮
  0.30                   │╰╮
  0.29                  ╭╯ 
  0.28                    ╰╮
  0.27                            ╭╮ ╭─
  0.26               ╭╮╭╯   │╭──╮  ╭╯│ 
  0.26               │││    ││  ╰╮  ╰─╯
  0.25              ╭╯╰╯    ╰╯   ╰─╯
  0.24          ╭╮ ╭╯
  0.23          ││╭╯
  0.22          │╰╯
  0.21          
  0.20          
  0.19          
  0.18         ╭╯
  0.17  ┼───────╯

a short info can be obtained by

beempy ticker
+----------------+-------------------+
| Key            | Value             |
+----------------+-------------------+
| highest_bid    | 0.253913 HIVE/HBD |
| latest         | 0.300000 HIVE/HBD |
| lowest_ask     | 0.253994 HIVE/HBD |
| percent_change | 0.00 %            |
| sbd_volume     | 199.189 HBD       |
| steem_volume   | 765.713 HIVE      |
+----------------+-------------------+

Let's trade some HBD for HIVE

First we should check our balance:

beempy balance holger80

and then start to sell 1 HBD

beempy sell -a holger80 1 HBD

I'm now asked if the price is ok:

Is the following Price ok: 0.253913 HBD/HIVE [y/n]:

and should then enter my active wif:

Password to unlock wallet or posting/active wif:

I see then the broadcasted op:

Wif accepted!
{
    "expiration": "2020-03-24T20:34:03",
    "ref_block_num": 63124,
    "ref_block_prefix": 2805668693,
    "operations": [
        [
            "limit_order_create",
            {
                "owner": "holger80",
                "orderid": 3815817900,
                "amount_to_sell": "1.000 HBD",
                "min_to_receive": "3.938 HIVE",
                "fill_or_kill": false,
                "expiration": "2020-03-31T20:33:33"
            }
        ]
    ],
    "extensions": [],
    "signatures": [
        "206b30dd79130814b9f14468c573fd9154020148e43481f810343964b93bcf8c1865927d49d1e3b521ff9a2af12bd5461c2edee220b64f59108c04413c3b88cbb0"
    ]
}

and can check my open orders:

beempy openorders holger80 
+------------+---------------------+------------------------------------------+----------+
|    Orderid |             Created |                                    Order |  Account |
+------------+---------------------+------------------------------------------+----------+
| 3815817900 | 2020-03-24T20:33:33 | 3.938 HIVE 1.000 HBD @ 0.253936 HBD/HIVE | holger80 |
+------------+---------------------+------------------------------------------+----------+

Cancel open orders

I can cancel my order by

beempy cancel -a 3815817900 

Instead of selling 1 HBD, I can also buy 1 HIVE by

beempy buy -a holger80 1 HIVE

after checking the price and entering my wif, the order is placed.

Using the orderbook to fulfill orders

Let's check the first 5 orders:

beempy orderbook -l 5
+--------------+----------------------------------------------+--------------+-------------------------------------------+
| Asks Sum HBD |                                  Sell Orders | Bids Sum HBD |                                Buy Orders |
+--------------+----------------------------------------------+--------------+-------------------------------------------+
|        66.15 |  260.432 HIVE 66.148 HBD @ 0.253993 HBD/HIVE |         0.44 |  1.725 HIVE 0.438 HBD @ 0.253913 HBD/HIVE |
|       240.43 | 637.769 HIVE 174.284 HBD @ 0.273271 HBD/HIVE |         0.70 |  1.032 HIVE 0.262 HBD @ 0.253876 HBD/HIVE |
|       267.93 |  100.000 HIVE 27.500 HBD @ 0.275000 HBD/HIVE |         0.91 |  0.842 HIVE 0.211 HBD @ 0.250594 HBD/HIVE |
|       283.93 |   53.344 HIVE 16.002 HBD @ 0.299978 HBD/HIVE |         0.91 |  0.004 HIVE 0.001 HBD @ 0.250000 HBD/HIVE |
|       296.29 |   41.191 HIVE 12.357 HBD @ 0.299993 HBD/HIVE |         6.64 | 23.778 HIVE 5.731 HBD @ 0.241021 HBD/HIVE |
+--------------+----------------------------------------------+--------------+-------------------------------------------+

I can now sell 1 HBD @ 0.253993 HBD/HIVE as shown in the Asks column and the order should be fulfilled without waiting. Let's try:

 beempy sell -a holger80 1 HBD 0.253993

This time, I can enter the wif without asking for the price. The orderbook is empty this time:

beempy openorders  holger80 
+---------+---------+-------+---------+
| Orderid | Created | Order | Account |
+---------+---------+-------+---------+
+---------+---------+-------+---------+

The blockexplorer shows that my order was fulfilled:
image.png

I hope this help as long as the internal market has no interface.

Sort:  

steemtrade.png
but there is an interface by @mahdiyari
https://wallet.mahdiyari.info/market
its just been widely ignored...

Isn't that STEEM/SBD?

nope dont be fooled by those words. this is hive :D

Yes, I noticed the difference after observing it closely. Then I also found the post from @mahdiyari confirming this:

https://peakd.com/hive/@mahdiyari/alternative-hive-wallet-https-wallet-mahdiyari-info.

Thanks for this info!

Its a clone/fork of the original Steemit interface

I wonder how come there is so much of trade volume without even a friendly interface!

Okay gotcha! All existing market orders on Steem internal market exist for Hive/HBD market too. I thought I missed the HBD airdrop for my SBD lying in the internal market. Thankfully, I found it here :)

Finds großartig was du beem(py) leistest, danke für die Arbeit die du da reingesteck hast!

This post has been voted on by the HiveSTEM curation team and voting trail. It is elligible for support from @curie and @minnowbooster.

If you appreciate the work we are doing, then consider supporting our witness @stem.witness. Additional witness support to the curie witness would be appreciated as well.

For additional information please join us on the SteemSTEM discord and to get to know the rest of the community!

Please consider using the stem.openhive.network app and including @steemstem as a beneficiary of this post. This could yield a stronger support.