Git Product home page Git Product logo

blackbot's Introduction

PyWaves

PyWaves is an object-oriented Python interface to the Waves blockchain platform.

Getting Started

You can install PyWaves using:

pip install pywaves

Documentation

The library utilizes classes to represent various Waves data structures:

  • pywaves.Address
  • pywaves.Asset
  • pywaves.AssetPair
  • pywaves.Order

Code Example

import pywaves as pw

myAddress = pw.Address(privateKey='CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S')
otherAddress = pw.Address('3PNTcNiUzppQXDL9RZrK3BcftbujiFqrAfM')
myAddress.sendWaves(otherAddress, 10000000)
myToken = myAddress.issueAsset('Token1', 'My Token', 1000, 0)
while not myToken.status():
	pass
myAddress.sendAsset(otherAddress, myToken, 50)

Address Class

pywaves.Address(address, publicKey, privateKey, seed) Creates a new Address object

attributes:

  • address
  • publicKey
  • privateKey
  • seed

methods:

balance(assetId='', confirmations=0) returns balance of Waves or other assets

assets() returns a list of assets owned by the address

issueAsset(name, description, quantity, decimals=0, reissuable=False, txFee=DEFAULT_ASSET_FEE, timestamp=0) issue a new asset

reissueAsset(Asset, quantity, reissuable=False, txFee=DEFAULT_ASSET_FEE, timestamp=0) reissue an asset

burnAsset(Asset, quantity, txFee=DEFAULT_ASSET_FEE, timestamp=0) burn the specified quantity of an asset

sendWaves(recipient, amount, attachment='', txFee=DEFAULT_TX_FEE, timestamp=0) send specified amount of Waves to recipient

massTransferWaves(transfers, attachment='', timestamp=0) sending Waves tokens via a mass transfer

sendAsset(recipient, asset, amount, attachment='', txFee=DEFAULT_TX_FEE, timestamp=0) send specified amount of an asset to recipient

massTransferWaves(self, transfers, attachment='', timestamp=0) sending an asset via mass transfer

cancelOrder(assetPair, order) cancel an order

buy(assetPair, amount price, maxLifetime=30*86400, matcherFee=DEFAULT_MATCHER_FEE, timestamp=0) post a buy order

tradableBalance(assetPair) get tradable balance for the specified asset pair

sell(assetPair, amount, price, maxLifetime=30*86400, matcherFee=DEFAULT_MATCHER_FEE, timestamp=0) post a sell order

lease(recipient, amount, txFee=DEFAULT_LEASE_FEE, timestamp=0) post a lease transaction

leaseCancel(leaseId, txFee=DEFAULT_LEASE_FEE, timestamp=0) cancel a lease

getOrderHistory(assetPair) get order history for the specified asset pair

cancelOpenOrders(assetPair) cancel all open orders for the specified asset pair

deleteOrderHistory(assetPair) delete order history for the specified asset pair

createAlias(alias, txFee=DEFAULT_ALIAS_FEE, timestamp=0) create alias

sponsorAsset(assetId, minimalFeeInAssets, txFee=pywaves.DEFAULT_SPONSOR_FEE, timestamp=0) sponsoring assets

setScript(script, txFee=pywaves.DEFAULT_SCRIPT_FEE, timestamp=0) sets a script for this address

dataTransaction(data, timestamp=0) sets data for the account. data should be a json array with entries including type (bool, binary, int, string), key and value

deleteDataEntry(key) deletes a given data entry, identified by key, from the data storage of the account

setScript(scriptSource, txFee=pywaves.DEFAULT_SCRIPT_FEE, timestamp=0) issue a smart asset

setAssetScript(asset, scriptSource, txFee=pywaves.DEFAULT_ASSET_SCRIPT_FEE, timestamp=0) set a new script for a smart asset

invokeScript(dappAddress, functionName, params, payments, feeAsset = None, txFee=pywaves.DEFAULT_INVOKE_SCRIPT_FEE) invoke a script on a given dapp address

Asset Class

pywaves.Asset(assetId) Creates a new Asset object

attributes:

  • status
  • assetId
  • issuer
  • name
  • description
  • quantity
  • decimals = 0
  • reissuable = False

methods:

status() returns 'Issued' if the asset exists

AssetPair Class

pywaves.AssetPair(asset1, asset2) Creates a new AssetPair object with 2 Asset objects

attributes:

  • asset1
  • asset2

methods:

orderbook() get order book

ticker() get ticker with 24h ohlcv data

last() get traded price

open() get 24h open price

high() get 24h high price

low() get 24h low price

close() get 24h close price (same as last())

vwap() get 24h vwap price

volume() get 24h volume

priceVolume() get 24h price volume

trades(n) get the last n trades

trades(from, to) get the trades in from/to interval

candles(timeframe, n) get the last n candles in the specified timeframe

candles(timeframe, from, to) get the candles in from/to interval in the specified timeframe

Order Class

pywaves.Order(orderId, assetPair, address='') Creates a new Order object

attributes:

  • status
  • orderId
  • assetPair
  • address
  • matcher
  • matcherPublicKey

methods:

status() returns current order status cancel() cancel the order

WXFeeCalculator Class

This class is meant to provide the necessary functionality to calculate fees according to the new WX fee structure

All values here for price and amounts of tokens are always in the smallest unit of the token ("satoshis").

Methods:

calculateDynamicFee() calculates the dynamic fee for a trade

calculateDynamicDiscountFee() calculates the dynamic discounted fee for a trade

calculatePercentSellingFee(priceAssetId, amountAssetId, amountToSell) calculates the percentage selling fee for a trade

calculatePercentDiscountedSellingFee(priceAssetId, amountAssetId, amountToSell) calculates the discounted percentage selling fee for a trade

calculatePercentBuyingFee(priceAssetId, price, amountToBuy) calculates the percentage buying fee for a trade

calculatePercentDiscountedBuyingFee(priceAssetId, price, amountToBuy) calculates the discounted percentage buying fee for a trade

Example:

import pywaves as pw

config = {
    'amountAsset': 'WAVES',
    'priceAsset': '25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT',
    'privateKey': 'xxx'
}

pw.setNode('https://nodes-testnet.wavesnodes.com/', chain='testnet')
pw.setMatcher('http://matcher-testnet.waves.exchange')

wxFeeCalculator = pw.WXFeeCalculator()
address = pw.Address(privateKey=config['privateKey'])
tradingPair = pw.AssetPair(pw.Asset(config['amountAsset']), pw.Asset(config['priceAsset']))
price = 5
amountToBuy = 1000000000
matcherFee = wxFeeCalculator.calculatePercentDiscountedBuyingFee(config['priceAsset'], price, amountToBuy)
tx = address.buy(tradingPair, amountToBuy, price, matcherFee = matcherFee, matcherFeeAssetId = 'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc')
print (tx)

Other functions

pywaves.setNode(node, chain, chain_id) set node URL ('http://ip-address:port') and chain (either 'mainnet' or 'testnet', or any other chain, if you also define the chain id)

pywaves.setChain(chain, chain_id) set chain (either 'mainnet' or 'testnet', or any other chain if you also supply the chain id)

pywaves.setOffline() switch to offline mode; sign tx locally without broadcasting to network

pywaves.setOnline() switch to online mode; sign tx locally a broadcast to network

pywaves.validateAddress(address) checks if the provided address is a valid Waves address

pywaves.setMatcher(node) set matcher URL ('http://ip-address:port')

pywaves.setDatafeed(node) set datafeed URL ('http://ip-address:port')

pywaves.height() get blockchain height

pywaves.lastblock() get last block

pywaves.block(n) get block at specified height

pywaves.tx(id) get transaction details

pywaves.stateChangeForTx(id): get the state changes for the given tx by id

pywaves.stateChangesForAddress(address, limit = 1000): get the last (with a default of 1000) state changes for the given address

pywaves.symbols() get list of symbol-asset mapping

pywaves.markets() get all traded markets with tickers

pywaves.{SYMBOL_NAME} get predefined asset for the specified symbol (pywaves.WAVES, pywaves.BTC, pywaves.USD,...)

Default Fees

The fees for waves/asset transfers, asset issue/reissue/burn and matcher transactions are set by default as follows:

  • DEFAULT_TX_FEE = 100000
  • DEFAULT_ASSET_FEE = 100000000
  • DEFAULT_MATCHER_FEE = 1000000
  • DEFAULT_LEASE_FEE = 100000
  • DEFAULT_ALIAS_FEE = 100000
  • DEFAULT_SPONSOR_FEE = 100000000
  • DEFAULT_SCRIPT_FEE = 100000

More Examples

Playing with addresses:

import pywaves as pw

# generate a new address
myAddress = pw.Address("<some address>")
myAddress._generate()

# set an address with an address
myAddress = pw.Address('3P6WfA4qYtkgwVAsWiiB6yaea2X8zyXncJh')

# get an existing address from seed
myAddress = pw.Address(seed='seven wrist bargain hope pattern banner plastic maple student chaos grit next space visa answer')

# get an existing address from privateKey
myAddress = pw.Address(privateKey='CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S')

# get an existing address from a publicKey
address = pw.Address(publicKey=EYNuSmW4Adtcc6AMCZyxkiHMPmF2BZ2XxvjpBip3UFZL”)

# get an address from a seed with a different nonce (This is especially useful for accessing addresses generated by nodes)
myAddress = pw.Address(seed='seven wrist bargain hope pattern banner plastic maple student chaos grit next space visa answer', nonce=1)

Balances:

import pywaves as pw

myAddress = pw.Address('3P6WfA4qYtkgwVAsWiiB6yaea2X8zyXncJh')

# get Waves balance
print("Your balance is %18d" % myAddress.balance())

# get Waves balance after 20 confirmations 
print("Your balance is %18d" % myAddress.balance(confirmations = 20))

# get an asset balance
print("Your asset balance is %18d" % myAddress.balance('DHgwrRvVyqJsepd32YbBqUeDH4GJ1N984X8QoekjgH8J'))

Waves and asset transfers:

import pywaves as pw

myAddress = pw.Address(privateKey='CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S')

# send Waves to another address
myAddress.sendWaves(recipient = pw.Address('3PNTcNiUzppQXDL9RZrK3BcftbujiFqrAfM'),
                    amount = 100000000)

# send asset to another address
myToken = pw.Asset('4ZzED8WJXsvuo2MEm2BmZ87Azw8Sx7TVC6ufSUA5LyTV')
myAddress.sendAsset(recipient = pw.Address('3PNTcNiUzppQXDL9RZrK3BcftbujiFqrAfM'),
                    asset = myToken,
                    amount = 1000)

Issuing an asset:

import pywaves as pw

myToken = myAddress.issueAsset( name = "MyToken",
                                description = "This is my first token",
                                quantity = 1000000,
                                decimals = 2 )

Create an alias:

import pywaves as pw

pw.setNode(node = 'http://127.0.0.1:6869', chain = 'testnet')

myAddress = pw.Address(privateKey='CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S')
myAddress.createAlias("MYALIAS1")

Mass payment:

import pywaves as pw

recipients =   ['3PBbp6bg2YEnHfdJtYM7jzzXYQeb7sx5oFg',
                '3P4A27aCd3skNja46pcgrLYEnK36TkSzgUp',
                '3P81U3ujotNUwZMWALdcJQLzBVbrAuUQMfs',
                '3PGcKEMwQcEbmeL8Jhe9nZQRBNCNdcHCoZP',
                '3PKjtzZ4FhKrJUikbQ1hRk5xbwVKDyTyvkn']

myAddress = pw.Address(privateKey = "CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S")

for address in recipients:
	myAddress.sendWaves(pw.Address(address), 1000000)

Mass transfer of Waves (feature 11)

import pywaves as pw

transfers = [
	{ 'recipient': '3N1xca2DY8AEwqRDAJpzUgY99eq8J9h4rB3', 'amount': 1 },
	{ 'recipient': '3N3YWbQ27NnK7tek6ASFh38Bj93guLxxSi1', 'amount': 2 },
	{ 'recipient': '3MwiB5UkWxt4X1qJ8DQpP2LpM3m48V1z5rC', 'amount': 3 }
]

address = pw.Address(privateKey = "CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S")
address.massTransferWaves(transfers)

Mass transfer of Assets (feature 11)

import pywaves as pw

transfers = [
	{ 'recipient': '3N1xca2DY8AEwqRDAJpzUgY99eq8J9h4rB3', 'amount': 1 },
	{ 'recipient': '3N3YWbQ27NnK7tek6ASFh38Bj93guLxxSi1', 'amount': 2 },
	{ 'recipient': '3MwiB5UkWxt4X1qJ8DQpP2LpM3m48V1z5rC', 'amount': 3 }
]

address = pw.Address(privateKey = "CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S")
address.massTransferAssets(transfers, pw.Asset('9DtBNdyBCyViLZHptyF1HbQk73F6s7nQ5dXhNHubtBhd'))

Data Transaction:

import pywaves as py

myAddress = py.Address(privateKey='CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S')

data = [{
        'type':'string', 
        'key': 'test', 
        'value':'testval'
        }]

myAddress.dataTransaction(data)

Token airdrop:

import pywaves as pw

myAddress = pw.Address(privateKey = '`')
myToken = pw.Asset('4ZzED8WJXsvuo2MEm2BmZ87Azw8Sx7TVC6ufSUA5LyTV')
amount = 1000

with open('recipients.txt') as f:
	lines = f.readlines()
for address in lines:
	myAddress.sendAsset(pw.Address(address.strip()), myToken, amount)

Add a script to an account:

import pywaves as pw
import base64

pw.setNode(node='<node>', chain='testnet')

script = 'match tx { \n' + \
'  case _ => true\n' + \
'}'
address = pw.Address(privateKey = "<private key>")
tx = address.setScript(script, txFee=1000000)

Issue a Smart Asset

imort pywaves as pw
import base64

pw.setNode(node='<node>', chain='testnet')

script = 'match tx { \n' + \
'  case _ => true\n' + \
'}'
address = pw.Address(privateKey = '<private key>')
tx = address.issueSmartAsset('smartTestAsset', 'an asset for testingsmart assets', 1000, script, 2)

Set a new script for a Smart Asset

import pywaves as pw
import base64

pw.setNode(node='<node>', chain='testnet')

script = 'match tx { \n' + \
'  case _ => true\n' + \
'}'
address = pw.Address(privateKey = '<private key>')
tx = address.setAssetScript(pw.Asset('<asset id>'), script)

Invoking a script on a dapp address

import pywaves as pw

pw.setNode(node='<node>', chain='testnet')

address = pw.Address(privateKey = '<private key>')
tx = address.invokeScript('3N5Wq22bLSf3gt5VwHTCRbRnETeSwpuT8kK', 'fundRecipient', [{"type": "integer", "value": 100, }, { "type": "string", "value": "test" }, { "type": "boolean", "value": True }], [ { "amount": 100, "assetId": "BGNVLgPKLwiBiZ7vWLcy3r92MzpPCU2DuUb4tv9W6gMi" } ])

Working with contracts

import pywaves as pw

pw.setNode(node = '<node>', 'T')

contract = pw.Contract('3N7XfieeJ8dHyMJfs7amukzxKB1PfMXzHzi', '<seed>')
contract.faucet()

Working with oracles

Querrying oracles:

import pywaves as pw

oracle = pw.Oracle(oracleAddress = '3P4PCxsJqMzQBALo8zANHtBDZRRquobHQp7')
# getting all data entries for an oracle
print(oracle.getData())
# getting data for a specific key of an oracle
print(oracle.getData('order_total_EeH5DRjdMnoYDhNbtkLsRNZq95etJUqWtvMDBCXojBoy'))
# getting all data entries of an oracle filtered by a regular expression
print(oracle.getData(regex = '^order_total_.*$'))

Storing data in an oracle:

import pywaves as pw

pw.setNode('https://testnode1.wavesnodes.com', 'T')

oracle = pw.Oracle(seed='<your seed here>')
print(oracle.storeData('oracle_test', 'string', 'test entry from oracle class'))

Working with more than one network

import pywaves as pw

config = pw.ParallelPyWaves()
config.setNode('https://testnode1.wavesnodes.com', 'testnet')

tAddress = pw.Address(seed = "test test test", pywaves = config)

address = pw.Address(seed = "test test test")
print(tAddress.address)
print(address.address)
print(tAddress.address)

Playing with Waves Matcher node (DEX):

import pywaves as pw

# set Matcher node to use
pw.setMatcher(node = 'http://127.0.0.1:6886')

# post a buy order
BTC = pw.Asset('4ZzED8WJXsvuo2MEm2BmZ87Azw8Sx7TVC6ufSUA5LyTV')
USD = pw.Asset('6wuo2hTaDyPQVceETj1fc5p4WoMVCGMYNASN8ym4BGiL')
BTC_USD = pw.AssetPair(BTC, USD)
myOrder = myAddress.buy(assetPair = BTC_USD, amount = 15e8, price = 95075)

# post a sell order
WCT = pw.Asset('6wuo2hTaDyPQVceETj1fc5p4WoMVCGMYNASN8ym4BGiL')
Incent = pw.Asset('FLbGXzrpqkvucZqsHDcNxePTkh2ChmEi4GdBfDRRJVof')
WCT_Incent = pw.AssetPair(WCT, Incent)
myOrder = myAddress.sell(assetPair = WCT_Incent, amount = 100e8, price = 25e8)

# post a buy order using Waves as price asset
BTC = pw.Asset('4ZzED8WJXsvuo2MEm2BmZ87Azw8Sx7TVC6ufSUA5LyTV')
BTC_WAVES = pw.AssetPair(BTC, pw.WAVES)
myOrder = myAddress.buy(assetPair = BTC_WAVES, amount = 1e8, price = 50e8)

# cancel an order
myOrder.cancel()
# or
myAddress.cancelOrder(assetPair, myOrder)

Getting Market Data from Waves Data Feed (WDF):

import pywaves as pw

# set the asset pair
WAVES_BTC = pw.AssetPair(pw.WAVES, pw.BTC)

# get last price and volume
print("%s %s" % (WAVES_BTC.last(), WAVES_BTC.volume()))

# get ticker
ticker = WAVES_BTC.ticker()
print(ticker['24h_open'])
print(ticker['24h_vwap'])

# get last 10 trades
trades = WAVES_BTC.trades(10)
for t in trades:
	print("%s %s %s %s" % (t['buyer'], t['seller'], t['price'], t['amount']))
	
# get last 10 daily OHLCV candles
ohlcv = WAVES_BTC.candles(1440, 10)
for t in ohlcv:
	print("%s %s %s %s %s" % (t['open'], t['high'], t['low'], t['close'], t['volume']))

LPOS

import pywaves as pw

# connect to a local testnet node
pw.setNode(node = 'http://127.0.0.1:6869', chain = 'testnet')

myAddress = pw.Address(privateKey = 'CsBpQpNE3Z1THNMS9vJPaXqYwN9Hgmhd9AsAPrM3tiuJ')
minerAddress = pw.Address('3NBThmVJmcexzJ9itP9KiiC2K6qnGQwpqMq')

# lease 1000 Waves to minerAddress
leaseId = myAddress.lease(minerAddress, 100000000000)

# revoke the lease
myAddress.leaseCancel(leaseId)

Doing simple multisig

Thanks to the new functionality of the TxSigner and TxGenerator classes, new functionality like multisig is possible:

pw.setNode('https://nodes-testnet.wavesnodes.com', 'T')
firstAddress = address.Address(seed = 'this is just a simple test seed one')
secondAddress = address.Address(seed = 'this is just a simple test seed two')

generator = txGenerator.TxGenerator()
signer = txSigner.TxSigner()
tx = generator.generateSendWaves(secondAddress, 1, firstAddress.publicKey, txFee=500000)
signer.signTx(tx, firstAddress.privateKey)
signer.signTx(tx, secondAddress.privateKey)

res = firstAddress.broadcastTx(tx)

Using PyWaves in a Python shell

Check an address balance:

>>> import pywaves as pw
>>> pw.Address('3P31zvGdh6ai6JK6zZ18TjYzJsa1B83YPoj')
address = 3P31zvGdh6ai6JK6zZ18TjYzJsa1B83YPoj
publicKey = 
privateKey = 
seed = 
balances:
  Waves = 1186077288304570
  BDMRyZsmDZpgKhdM7fUTknKcUbVVkDpMcqEj31PUzjMy (Tokes) = 43570656915
  RRBqh2XxcwAdLYEdSickM589Vb4RCemBCPH5mJaWhU9 (Ripto Bux) = 4938300000000
  4rmhfoscYcjz1imNDvtz45doouvrQqDpbX7xdfLB4guF (incentCoffee) = 7
  Ftim86CXM6hANxArJXZs2Fq7XLs3nJvgBzzEwQWwQn6N (Waves) = 2117290600000000
  E4ip4jzTc4PCvebYn1818T4LNoYBVL3Y4Y4dMPatGwa9 (BitCoin) = 500000000000
  FLbGXzrpqkvucZqsHDcNxePTkh2ChmEi4GdBfDRRJVof (Incent) = 12302659925430
  GQr2fpkfmWjMaZCbqMxefbiwgvpcNgYdev7xpuX6xqcE (KISS) = 1000
  DxG3PLganyNzajHGzvWLjc4P3T2CpkBGxY4J9eJAAUPw (UltraCoin) = 200000000000000
  4eWBPyY4XNPsFLoQK3iuVUfamqKLDu5o6zQCYyp9d8Ae (LIKE) = 1000
>>> 

Generate a new address:

>>> import pywaves as pw
>>> newAddress = pw.Address('<some address>')
>>> newAddress._generate()
address = 3P6WfA4qYtkgwVAsWiiB6yaea2X8zyXncJh
publicKey = EYNuSmW4Adtcc6AMCZyxkiHMPmF2BZ2XxvjpBip3UFZL
privateKey = CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S
seed = seven wrist bargain hope pattern banner plastic maple student chaos grit next space visa answer
balances:
  Waves = 0
>>> 

Check an asset:

>>> import pywaves as pw
>>> pw.Asset('DHgwrRvVyqJsepd32YbBqUeDH4GJ1N984X8QoekjgH8J')
status = Issued
assetId = DHgwrRvVyqJsepd32YbBqUeDH4GJ1N984X8QoekjgH8J
issuer = 3PPKF2pH4KMYgsDixjrhnWrPycVHr1Ye37V
name = WavesCommunity
description = Waves community token.
quantity = 1000000000
decimals = 2
reissuable = False

Post an order and check its status:

>>> myOrder = myAddress.buy(pw.AssetPair(token1, token2), 1, 25)
>>> myOrder
status = Accepted
id = ARZdYgfXz3ksRMvhnGeLLJnn3CQnz7RCa7U6dVw3zert
asset1 = AFzL992FQbhcgSZGKDKAiRWcjtthM55yVCE99hwbHf88
asset2 = 49Aha2RR2eunR3KZFwedfdi7K9v5MLQbLYcmVdp2QkZT
sender.address = 3P6WfA4qYtkgwVAsWiiB6yaea2X8zyXncJh
sender.publicKey = EYNuSmW4Adtcc6AMCZyxkiHMPmF2BZ2XxvjpBip3UFZL
matcher = http://127.0.0.1:6886

Cancel the order

>>> myOrder.cancel()
>>> myOrder
status = Cancelled
id = ARZdYgfXz3ksRMvhnGeLLJnn3CQnz7RCa7U6dVw3zert
asset1 = AFzL992FQbhcgSZGKDKAiRWcjtthM55yVCE99hwbHf88
asset2 = 49Aha2RR2eunR3KZFwedfdi7K9v5MLQbLYcmVdp2QkZT
sender.address = 3P6WfA4qYtkgwVAsWiiB6yaea2X8zyXncJh
sender.publicKey = EYNuSmW4Adtcc6AMCZyxkiHMPmF2BZ2XxvjpBip3UFZL
matcher = http://127.0.0.1:6886

Offline signing and custom timestamps

Offline signing a future transaction:

>>> import pywaves as pw
>>> pw.setOffline()
>>> myAddress=pw.Address(privateKey="F2jVbjrKzjUsZ1AQRdnd8MmxFc85NQz5jwvZX4BXswXv")
>>> recipient=pw.Address("3P8Ya6Ary5gzwnzbBXDp3xjeNG97JEiPcdA")
# sign a future tx to transfer 100 WAVES to recipient
# the tx is valid on Jan 1st, 2020 12:00pm
>>> myAddress.sendWaves(recipient, amount=100e8, timestamp=1577880000000)
{'api-endpoint': '/assets/broadcast/transfer',
 'api-type': 'POST',
 'api-data': '{"fee": 100000,
			   "timestamp": 1577880000000,
			   "senderPublicKey": "27zdzBa1q46RCMamZ8gw2xrTGypZnbzXs5J1Y2HbUmEv",
			   "amount": 10000000000,
			   "attachment": "",
			   "recipient": "3P8Ya6Ary5gzwnzbBXDp3xjeNG97JEiPcdA"
			   "signature": "YetPopTJWC4WBPXbneWv9g6YEp6J9g9rquZWjewjdQnFbmaxtXjrRsUu69NZzHebVzUGLrhQiFFoguXJwdUn8BH"}'}

Offline signing time lock/unlock transactions:

>>> import pywaves as pw
>>> pw.setOffline()
>>> myAddress=pw.Address(privateKey="F2jVbjrKzjUsZ1AQRdnd8MmxFc85NQz5jwvZX4BXswXv")
# generate a lockbox address
>>> lockAddress=pw.Address('<some address>')
>>> lockAddress._generate()
# sign the 'lock' tx to send 100e8 to the lockbox (valid on Nov 1st, 2017)
>>> myAddress.sendWaves(lockAddress, 100e8, timestamp=1509537600000)
{'api-endpoint': '/assets/broadcast/transfer',
 'api-type': 'POST',
 'api-data': '{"fee": 100000,
               "timestamp": 1509537600000,
               "senderPublicKey": "27zdzBa1q46RCMamZ8gw2xrTGypZnbzXs5J1Y2HbUmEv",
               "amount": 10000000000,
               "attachment": "",
               "recipient": "3P3UbyQM9W7WzTgjYkLuBrPZZeWsiUtCcpv",
               "signature": "5VgT6qWxJwxEyrxFNfsi67QqbyUiGq9Ka7HVzgovRTTDT8nLRyuQv2wBAJQhRiXDkTTV6zsQmHnBkh8keCaFPoNT"}'}
# sign the 'unlock' tx to send funds back to myAddress (valid on Jan 1st, 2020)
>>> lockAddress.sendWaves(myAddress, 100e8-200000, txFee=200000, timestamp=1577880000000)
{'api-endpoint': '/assets/broadcast/transfer',
 'api-type': 'POST',
 'api-data': '{"fee": 200000,
               "timestamp": 1577880000000,
			   "senderPublicKey": "52XnBGnAVZmw1CHo9aJPiMsVMiTWeNGSNN9aYJ7cDtx4",
			   "amount": 9999800000,
			   "attachment": "",
			   "recipient": "3P7tfdCaTyYCfg5ojxNahEJDSS4MZ7ybXBY",
			   "signature": "3beyz1sqKefP96LaXWT3CxdPRW86DAxcj6wgWPyyKq3SgdotVqnKyWXDyeHnBzCq1nC7JA9CChTmo1c1iVAv6C4T"}'}
# delete lockbox address and private key
>>> del lockAddress

Connecting to a different node or chain

PyWaves supports both mainnet and testnet chains. By default, PyWaves connects to the mainnet RPC server at https://nodes.wavesnodes.com. It's possible to specify a different server and chain with the setNode() function

import pywaves as pw

# connects to a local testnet node
pw.setNode(node = 'http://127.0.0.1:6869', chain = 'testnet')

# connects to a local mainnet node
pw.setNode(node = 'http://127.0.0.1:6869', chain = 'mainnet')

License

Code released under the MIT License.

blackbot's People

Contributors

jansenmarc avatar kinbitz avatar marcjansen-tommapps avatar pywaves avatar sabotagebeats avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blackbot's Issues

The SELL side of the grid doesn't reach the maximum possible sell side orders

This check needs to be changed to allow the maximum number of levels for SELL side to reach the full size of the grid because it less than GRID_LEVELS, but to allow this change more code changes are needed.

if 0 <= level < GRID_LEVELS and (grid[level] == "" or grid[level] == "-"):

This line has to be changed to grid = ["-"] * (GRID_LEVELS+1)

grid = ["-"] * GRID_LEVELS

This line has to be changed to for n in range(last_level + 1, GRID_LEVELS+1):

for n in range(last_level + 1, GRID_LEVELS):

A Question

Hello.
Do not you plan to make a similar bot, e. g. on Binance, too?
Thanks.

PS: I am sorry for writing into an issue but there is not any other way to contact you on GitHub (or I do not know it).

blackbot crashes sometimes

`Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
chunked=chunked)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "", line 2, in raise_from
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 1331, in getresponse
response.begin()
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 297, in begin
version, status, reason = self._read_status()
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\socket.py", line 586, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\util\retry.py", line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\packages\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
chunked=chunked)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "", line 2, in raise_from
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 1331, in getresponse
response.begin()
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 297, in beginn begin
version, status, reason = self._read_status() n _read_status
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 258, in _read_status dinto
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\socket.py", line 586, in reaing connection was forcibly closed by the remote host', None, 10054, None))dinto
return self._sock.recv_into(b)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

During handling of the above exception, another exception occurred:
s.py", line 887, in deleteOrderHistory
Traceback (most recent call last): '' else assetPair.asset1.assetId, 'WAVES' if assetPair.asset2.assetId == '' else assetPair.asset2.assetId), data, host=pywaves.MATCHER)
File "BlackBot.py", line 181, in
BLACKBOT.deleteOrderHistory(PAIR)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\pywaves\address.py", line 887, in deleteOrderHistory pywaves.wrapper('/matcher/orderbook/%s/%s/delete' % ('WAVES' if assetPair.asset1.assetId == '' else assetPair.asset1.assetId, 'WAVES' if assetPair.asset2.assetId == '' else assetPair.asset2.assetId), data, host=pywaves.MATCHER)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\pywaves_init_.py", line 131, in wrapper req = requests.post('%s%s' % (host, api), data=postData, headers={'content-type': 'application/json'}).json() File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\adapters.py", line 490, in send raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
`

Need guidance on how to set asset id

amount_asset = WAVES
price_asset = 8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS

In this example, Waves is being traded against Bitcoin?

How do we trade it against another asset?

Example WCT

amount_asset = WAVES
price_asset = DHgwrRvVyqJsepd32YbBqUeDH4GJ1N984X8QoekjgH8J

or

amount_asset = DHgwrRvVyqJsepd32YbBqUeDH4GJ1N984X8QoekjgH8J
price_asset = WAVES

TypeError: string indices must be integers

[main]
node = https://nodes.wavesplatform.com
# select the network: testnet or mainnet
network = mainnet
matcher = https://nodes.wavesplatform.com
order_fee = 300000
order_lifetime = 86400

[account]
private_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

[market]
amount_asset = HZk1mbfuJpmxU1Fs4AX5MWLVYtctsNcg6e2C6VKqK8zk
price_asset = WAVES

[grid]
interval = 0.005
tranche_size = 50000000
grid_levels = 5
# base price calculation: LAST, BID, ASK, nnnnn (fixed constant price)
base = 2700000000
# grid type: SYMMEMTRIC, BIDS only, ASKS, only
type = symmetric

[logging]
logfile = bot.log

PyWaves 0.8.8
File "blackbot.py", line 122, in
BLACKBOT.cancelOpenOrders(PAIR)
File "/usr/local/lib/python3.5/dist-packages/pywaves/address.py", line 797, in cancelOpenOrders
status = order['status']
TypeError: string indices must be integers

where I wrong?

Problem with the price placing order

Everything is fine in the CMD the base price and the price where to bot places the orders but when I open the waves platform the orders are placed at different price.
Example:
In the CMD:
Grid intitialisation [base price: 0.006200000]
SELL order 0.00620000

In the waves platform the orders are placed at SELL 6,200.00123999

Where to I have to make changes to fix it?

Price is pulled with moved decimal by two digits

@jansenmarc
@PyWaves
image
the price has been pulled as 1750.39 instead 17.5039

same issue on all pairs.
Are the last commits from March 2019 correct?

setting the manual price in the bot.cfg file doesn't solve the problem, since every time order is filled, bot reads the wrong sell price with moved decimal.

Is there a change to discuss it with anyone here?

error

Im getting getting the folowing error when i try to start the bot:
TypeError: " A bytes-like object is required (also str), not unicode"
I am running the bot on debian stretch in a virtualenv.. any help would be appreciated..

json decoder error

[Aug 25 2018 17:12:38 UTC] ?[1;37m:?[0;0m Cancelling open orders... Traceback (most recent call last): File ".\BlackBot.py", line 122, in <module> BLACKBOT.cancelOpenOrders(PAIR) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\pywaves\address.py", line 873, in cancelOpenOrders pywaves.wrapper('/matcher/orderbook/%s/%s/cancel' % ('WAVES' if assetPair.asset1.assetId == '' else assetPair.asset1.assetId, 'WAVES' if assetPair.asset2.assetId == '' else assetPair.asset2.assetId), data, host=pywaves.MATCHER) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\pywaves\__init__.py", line 131, in wrapper req = requests.post('%s%s' % (host, api), data=postData, headers={'content-type': 'application/json'}).json() File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\models.py", line 892, in json return complexjson.loads(self.text, **kwargs) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\json\__init__.py", line 354, in loads return _default_decoder.decode(s) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\json\decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\json\decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

started getting a error

Since few days I am getting an error as follows:

Traceback (most recent call last):
File "BlackBot.py", line 126, in
BLACKBOT.deleteOrderHistory(PAIR)
File "/usr/local/lib/python2.7/dist-packages/pywaves/address.py", line 888, in deleteOrderHistory
pywaves.wrapper('/matcher/orderbook/%s/%s/delete' % ('WAVES' if assetPair.asset1.assetId == '' else assetPair.asset1.assetId, 'WAVES' if assetPair.asset2.assetId == '' else assetPair.asset2.assetId), data, host=pywaves.MATCHER)
File "/usr/local/lib/python2.7/dist-packages/pywaves/init.py", line 130, in wrapper
req = requests.post('%s%s' % (host, api), data=postData, headers={'content-type': 'application/json'}).json()
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 896, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Error

[ERROR] {'error': 1, 'message': 'failed to parse json message', 'cause': None, 'validationErrors': {'obj.matcherPublicKey': [{'msg': ['error.incorrect.publicKeyAccount'], 'args': []}]}}

Error reading Last Price of WAVES/BTC

I’m using the pyWaves library to connect to the waves blockchain and read prices.

when I use the following commands in the main script it works perfectly:

WAVES_BTC = pw.AssetPair(pw.WAVES, pw.BTC)
last_trade_price = WAVES_BTC.last()
log(" Last Trade Price : %s" % last_trade_price)

but if I try to use it in a defined function, like this:

def get_last_price():
WAVES_BTC = pw.AssetPair(pw.WAVES, pw.BTC)
last_trade_price = WAVES_BTC.last()
log(" Last Trade Price : %s" % last_trade)
return last_trade_price

last_price = get_last_price()
log(" Last Trade Price : %s" % last_price)

it gives this error:

return str(self.ticker()[‘24h_close’])
KeyError: ‘24h_close’

int base price is whole waves, float base fails

in the config file:
base = 1
will start the base at 1 waves
base = 0.99
or smaller fails with error:

Traceback (most recent call last): File "BlackBot.py", line 146, in <module> if basePrice == 0: NameError: name 'basePrice' is not defined

so now there is no way to create base price under 1 waves

Invalid BASE price

This is my configuration file:

[main]
node = http://nodes.wavesnodes.com
# select the network: testnet or mainnet
network = mainnet
matcher = http://matcher.wavesnodes.com
order_fee = 300000
order_lifetime = 86400

[account]
private_key = my private key

[market]
amount_asset = WAVES
price_asset = mypriceid


[grid]
interval = 0.005
tranche_size = 200000000
grid_levels = 20
# base price calculation: LAST, BID, ASK, nnnnn (fixed constant price)
base = last
# amount flexibility in percent, 20% flexibility means that the amount of the order might flucture +/- 10% around the defined tranche_size
flexibility = 20
# grid type: SYMMEMTRIC, BIDS only, ASKS, only
type = symmetric

[logging]
logfile = bot.log

Out put when set base = LAST

[Jan 15 2020 07:02:03 UTC] :    Price Asset ID : XXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Jan 15 2020 07:02:03 UTC] : --------------------------------------------------------------------------------
[Jan 15 2020 07:02:03 UTC] :
[Jan 15 2020 07:02:04 UTC] : Cancelling open orders...
[Jan 15 2020 07:02:05 UTC] : Deleting order history...
[Jan 15 2020 07:02:06 UTC] :
[Jan 15 2020 07:02:06 UTC] : Invalid BASE price
[Jan 15 2020 07:02:06 UTC] : Exiting.

Could any help possible?

Config changes

I have an issue: after adding customisation network (last commit), script BlackBot.py (script updated too) can't parse an configuration. I've modified it (network added), PK omitted:

[main]
node = http://nodes.wavesnodes.com
# select the network: testnet or mainnet
network = mainnet
matcher = http://nodes.wavesnodes.com
order_fee = 300000
order_lifetime = 900

[account]
private_key =(omitted)

[market]
amount_asset = WAVES
price_asset = 8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS

[grid]
interval = 0.005
tranche_size = 25000000000
grid_levels = 5
# base price calculation: LAST, BID, ASK, nnnnn (fixed constant price)
base = ask
# grid type: SYMMEMTRIC, BIDS only, ASKS, only
type = symmetric

[logging]
logfile = bot.log

But every time I have this error in log:

[Feb 16 2018 10:51:42 UTC] : --------------------------------------------------------------------------------
[Feb 16 2018 10:51:42 UTC] : Error reading config file
[Feb 16 2018 10:51:42 UTC] : Exiting.

Where I am wrong?

Env:

Ubuntu 14.04 LTS
Python 2.7.10

[ERROR] Order Rejected - The order is invalid: price should be > 0

The bot starts correctly :

Reading config file 'bot.cfg'
--------------------------------------------------------------------------------
Address : (WALLET)
Amount Asset ID : WAVES
Price Asset ID : 8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS
--------------------------------------------------------------------------------

Cancelling open orders...
Deleting order history...

Then it loops with the following error :
[ERROR] Order Rejected - The order is invalid: price should be > 0

This is the config :

[main]
node = http://nodes.wavesnodes.com
network = mainnet
matcher = http://matcher.wavesnodes.com
order_fee = 300000
order_lifetime = 900

[account]
private_key = (...)

[market]
amount_asset = WAVES
price_asset = 8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS

[grid]
interval = 0.005
tranche_size = 200000000
grid_levels = 10
base = last
flexibility = 20
type = symmetric

[logging]
logfile = bot.log

Interval - Is this normal?

Hi,
this is my log file.

[Oct 24 2018 15:06:12 UTC] �[1;37m:�[0;0m
[Oct 24 2018 15:06:12 UTC] �[1;37m:�[0;0m Cancelling open orders...
[Oct 24 2018 15:06:13 UTC] �[1;37m:�[0;0m Deleting order history...
[Oct 24 2018 15:07:57 UTC] �[1;37m:�[0;0m
[Oct 24 2018 15:07:58 UTC] �[1;37m:�[0;0m Grid initialisation [base price : 0.00030376]
[Oct 24 2018 15:08:02 UTC] �[1;37m:�[0;0m >> [011] �[0;32mBUY order 0.00030194�[0;0m
[Oct 24 2018 15:08:07 UTC] �[1;37m:�[0;0m >> [010] �[0;32mBUY order 0.00030074�[0;0m
[Oct 24 2018 15:08:12 UTC] �[1;37m:�[0;0m >> [009] �[0;32mBUY order 0.00029954�[0;0m
[Oct 24 2018 15:08:21 UTC] �[1;37m:�[0;0m >> [008] �[0;32mBUY order 0.00029835�[0;0m
[Oct 24 2018 15:08:25 UTC] �[1;37m:�[0;0m >> [007] �[0;32mBUY order 0.00029716�[0;0m
[Oct 24 2018 15:08:30 UTC] �[1;37m:�[0;0m >> [006] �[0;32mBUY order 0.00029597�[0;0m
[Oct 24 2018 15:08:39 UTC] �[1;37m:�[0;0m >> [005] �[0;32mBUY order 0.00029480�[0;0m
[Oct 24 2018 15:08:49 UTC] �[1;37m:�[0;0m >> [004] �[0;32mBUY order 0.00029362�[0;0m
[Oct 24 2018 15:08:53 UTC] �[1;37m:�[0;0m >> [003] �[0;32mBUY order 0.00029245�[0;0m
[Oct 24 2018 15:08:57 UTC] �[1;37m:�[0;0m >> [002] �[0;32mBUY order 0.00029129�[0;0m
[Oct 24 2018 15:09:02 UTC] �[1;37m:�[0;0m >> [001] �[0;32mBUY order 0.00029013�[0;0m
[Oct 24 2018 15:09:06 UTC] �[1;37m:�[0;0m >> [000] �[0;32mBUY order 0.00028897�[0;0m
[Oct 24 2018 15:09:11 UTC] �[1;37m:�[0;0m >> [013] �[1;31mSELL order 0.00030435�[0;0m
[Oct 24 2018 15:09:15 UTC] �[1;37m:�[0;0m >> [014] �[1;31mSELL order 0.00030557�[0;0m
[Oct 24 2018 15:09:19 UTC] �[1;37m:�[0;0m >> [015] �[1;31mSELL order 0.00030679�[0;0m
[Oct 24 2018 15:09:34 UTC] �[1;37m:�[0;0m >> [016] �[1;31mSELL order 0.00030802�[0;0m
[Oct 24 2018 15:09:44 UTC] �[1;37m:�[0;0m >> [017] �[1;31mSELL order 0.00030925�[0;0m
[Oct 24 2018 15:09:59 UTC] �[1;37m:�[0;0m >> [018] �[1;31mSELL order 0.00031049�[0;0m
[Oct 24 2018 15:10:08 UTC] �[1;37m:�[0;0m >> [019] �[1;31mSELL order 0.00031173�[0;0m
[Oct 24 2018 15:10:12 UTC] �[1;37m:�[0;0m >> [020] �[1;31mSELL order 0.00031298�[0;0m
[Oct 24 2018 15:10:17 UTC] �[1;37m:�[0;0m >> [021] �[1;31mSELL order 0.00031423�[0;0m
[Oct 24 2018 15:10:22 UTC] �[1;37m:�[0;0m >> [022] �[1;31mSELL order 0.00031549�[0;0m
[Oct 24 2018 15:10:32 UTC] �[1;37m:�[0;0m >> [023] �[1;31mSELL order 0.00031675�[0;0m
[Oct 24 2018 15:10:36 UTC] �[1;37m:�[0;0m >> [024] �[1;31mSELL order 0.00031802�[0;0m
[Oct 24 2018 16:39:30 UTC] �[1;37m:�[0;0m ## [013] �[1;34mSELL Filled 0.00030435�[0;0m
[Oct 24 2018 16:39:39 UTC] �[1;37m:�[0;0m >> [013] �[1;31mSELL order 0.00030435�[0;0m
[Oct 24 2018 16:41:53 UTC] �[1;37m:�[0;0m ## [014] �[1;34mSELL Filled 0.00030557�[0;0m
[Oct 24 2018 16:42:03 UTC] �[1;37m:�[0;0m >> [014] �[1;31mSELL order 0.00030557�[0;0m
[Oct 24 2018 17:42:19 UTC] �[1;37m:�[0;0m ## [013] �[1;34mSELL Filled 0.00030435�[0;0m
[Oct 24 2018 17:45:16 UTC] �[1;37m:�[0;0m ## [011] �[1;34mBUY Filled 0.00030194�[0;0m
[Oct 24 2018 17:45:21 UTC] �[1;37m:�[0;0m >> [011] �[0;32mBUY order 0.00030194�[0;0m
[Oct 24 2018 17:45:32 UTC] �[1;37m:�[0;0m >> [013] �[1;31mSELL order 0.00030435�[0;0m
[Oct 24 2018 17:50:01 UTC] �[1;37m:�[0;0m ## [010] �[1;34mBUY Filled 0.00030074�[0;0m
[Oct 24 2018 17:50:06 UTC] �[1;37m:�[0;0m >> [010] �[0;32mBUY order 0.00030074�[0;0m
[Oct 24 2018 17:52:02 UTC] �[1;37m:�[0;0m ## [011] �[1;34mBUY Filled 0.00030194�[0;0m
[Oct 24 2018 17:52:07 UTC] �[1;37m:�[0;0m >> [011] �[0;32mBUY order 0.00030194�[0;0m

Is this normal?
SELL Filled in 0.00030435
and open an order of the same value (0.00030435).
and SELL Filled in 0.00030557
and open an order of the same value (0.00030557).

This is my CFG file.
[main]
node = http://nodes.wavesnodes.com
network = mainnet
matcher = http://matcher.wavesnodes.com
order_fee = 300000
order_lifetime = 43200

[account]
private_key = ******************************

[market]
amount_asset = WAVES
price_asset = 8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS

[grid]
interval = 0.004
tranche_size = 4000000000
grid_levels = 25
base = last
type = symmetric

[logging]
logfile = bot.log


NOT Compromised

This account is hacking wallets 3PA7s6dBUicge7uVwe6uLePvSj9sc8NMynR

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.