create account

bitshares python - accounttrades 方法踩坑记录 by cifer

View this thread on: hive.blogpeakd.comecency.com
· @cifer ·
$3.12
bitshares python - accounttrades 方法踩坑记录
![bb768539b6b5c78bc358b0ee1721054e.png](https://steemitimages.com/DQmawZhG2joJuiivKi8gU7QxmMaY5kKwk3aS1YvHA8szaK5/bb768539b6b5c78bc358b0ee1721054e.png)

今天使用 bitshares python 库时, 想要查询自己的交易历史, 看了下有 `accounttrades(account=None, limit=25)` 这么个方法可用, 然而调这个方法返回的交易记录却始终为空, 反复换了几个交易对都是空, 这真是不应该了, 明明我这些个交易对是有交易的.

看 bitshares python 的源码时才发现, 这个方法的注释里有这么一行字:

> note:: This call goes through the trade history and searches for your account, if there are no orders within ``limit`` trades, this call will return an empty array.

也就是说, 方法第二个参数默认值 `25` 限定的是所有交易的数量, 而不是我的交易数量...

这就不太友好了啊...

### 其它文章

#### 数字货币

* [关于 Tether 丢币事件的观察](https://steemit.com/cn-cryptocurrency/@cifer/tether)
* [什么是比特币的链上 (on-chain) 与链下 (off-chain) 交易, 以及往交易所充币后发生了什么](https://steemit.com/cn-cryptocurrency/@cifer/on-chain-off-chain)
* [为何留在 steemit?](https://steemit.com/cn/@cifer/5hbypg-steemit)
* [说一说重放, 重放保护, 以及分叉期间我们该怎么做](https://steemit.com/cn-cryptocurrency/@cifer/4cwfdn)
* [闲聊即将到来的 segwit2x 分叉](https://steemit.com/cn-cryptocurrency/@cifer/segwit2x)
* [electrum 钱包的 sweep 功能小记](https://steemit.com/cn-cryptocurrency/@cifer/electrum-sweep)
* [浅读 Steemit 的设计与规则](https://steemit.com/cn/@cifer/steemit)
* [bitshares 中的账户与权限个人理解](https://steemit.com/cn/@cifer/bitshares)
* [比特币地址, 公钥与私钥的格式以及如何保证比特币不丢失](https://steemit.com/bitcoin/@cifer/5rwvo4)

#### 数据分析

* [Where whales' upvotes going in last week/过去一周里大佬们的点赞去哪了](https://steemit.com/cryptocurrency/@cifer/where-whales-upvotes-going-in-last-week)

#### 编程系列

* [关于 Python 中的 time 与 datetime 模块](https://steemit.com/cn-programming/@cifer/python-time-datetime)
* [FreeRTOS 的链表 vListInsertEnd() 方法笔记](https://steemit.com/cn-programming/@cifer/freertos-vlistinsertend)
* [PHP 包管理工具 PEAR 与 PECL 介绍](https://steemit.com/cn-programming/@cifer/php-pear-pecl)
* [关于 steem-python 库的 AttibuteError 异常分析](https://steemit.com/cn/@cifer/steem-python-attibuteerror)
* [如何使用 C 语言中的 volatile 关键字?](https://steemit.com/cn/@cifer/c-volatile)
* [通俗地解释 CGI, FastCGI, php-fpm 之间的关系](https://steemit.com/cn/@cifer/cgi-fastcgi-php-fpm)
* [Linux C 程序中如何正确的判断一个文件/目录文件是否存在](https://steemit.com/cn/@cifer/linux-c)
* [深入解读同步/异步 IO 编程模型](https://steemit.com/cn/@cifer/io)
* [upvote robot simple implementation / 点赞机器人简易实现](https://steemit.com/steemit/@cifer/upvote-robot-simple-implementation)
* [用迭代方式精确模拟二叉树的递归遍历](https://steemit.com/cn/@cifer/6vtahh)
* [solidity 的编译器们](https://steemit.com/cn/@cifer/solidity)
👍  , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorcifer
permlinkbitshares-python-accounttrades
categorycn
json_metadata{"tags":["cn","cn-programming","bitshares","programming"],"image":["https://steemitimages.com/DQmawZhG2joJuiivKi8gU7QxmMaY5kKwk3aS1YvHA8szaK5/bb768539b6b5c78bc358b0ee1721054e.png"],"links":["https://steemit.com/cn-cryptocurrency/@cifer/tether","https://steemit.com/cn-cryptocurrency/@cifer/on-chain-off-chain","https://steemit.com/cn/@cifer/5hbypg-steemit","https://steemit.com/cn-cryptocurrency/@cifer/4cwfdn","https://steemit.com/cn-cryptocurrency/@cifer/segwit2x","https://steemit.com/cn-cryptocurrency/@cifer/electrum-sweep","https://steemit.com/cn/@cifer/steemit","https://steemit.com/cn/@cifer/bitshares","https://steemit.com/bitcoin/@cifer/5rwvo4","https://steemit.com/cryptocurrency/@cifer/where-whales-upvotes-going-in-last-week","https://steemit.com/cn-programming/@cifer/python-time-datetime","https://steemit.com/cn-programming/@cifer/freertos-vlistinsertend","https://steemit.com/cn-programming/@cifer/php-pear-pecl","https://steemit.com/cn/@cifer/steem-python-attibuteerror","https://steemit.com/cn/@cifer/c-volatile","https://steemit.com/cn/@cifer/cgi-fastcgi-php-fpm","https://steemit.com/cn/@cifer/linux-c","https://steemit.com/cn/@cifer/io","https://steemit.com/steemit/@cifer/upvote-robot-simple-implementation","https://steemit.com/cn/@cifer/6vtahh","https://steemit.com/cn/@cifer/solidity"],"app":"steemit/0.1","format":"markdown"}
created2017-12-10 07:38:06
last_update2017-12-10 07:38:06
depth0
children0
last_payout2017-12-17 07:38:06
cashout_time1969-12-31 23:59:59
total_payout_value2.452 HBD
curator_payout_value0.667 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,412
author_reputation8,256,283,569,876
root_title"bitshares python - accounttrades 方法踩坑记录"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,967,638
net_rshares758,854,305,418
author_curate_reward""
vote details (24)