Author Topic: pybitshares how to withdraw to external wallet  (Read 210 times)

0 Members and 1 Guest are viewing this topic.

Offline oddhome

pybitshares how to withdraw to external wallet
« on: April 05, 2018, 08:05:54 am »
please guide me to dev for pybitshares withdraw BTC to external wallet

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3182
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: pybitshares how to withdraw to external wallet
« Reply #1 on: April 05, 2018, 09:42:30 am »
You need the help of gateway service.
1. find out the correct gateway account name and memo syntax. For example, if your BTC is OPEN.BTC, contact openledger.io to get correct gateway account name and memo syntax, or figure out by your own via light wallet or web wallet (try to withdraw manually).
2. use pybitshares, send your BTC to the gateway account with correct memo
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline runestone

Re: pybitshares how to withdraw to external wallet
« Reply #2 on: April 05, 2018, 01:46:44 pm »
Get list of all coins at Openledger. Here you'll see "intermediateAccount" which contains the destination account name:
Code: [Select]
url = "https://ol-api1.openledger.info/api/v0/ol/support/coins"
r = requests.get(url).json()

This checks if the address you're about to send to is valid.
Code: [Select]
url = "https://ol-api1.openledger.info/api/v0/ol/support/wallets/"+asset+"/address-validator?address="+address
r = requests.get(url).json()

Memo is usually:
Code: [Select]
{{asset}}:{{address_where_openledger_should_transfer_to}}
Once you have all this, you can make your bitshares.transfer() call.
Br, Rune
~ Please vote on blockbasis-witness
~ https://www.blockbasis.com