Author Topic: Api question (get_account_history)  (Read 3700 times)

0 Members and 1 Guest are viewing this topic.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
I will try and make this happen :)

Thanks in advance.  +5%  :)
Easy integration of BitShares ecosystem with C# applications can bring us additional value.

https://github.com/wildbunny/c-graphene-api

You're welcome :)
Not that I know how to code C# .. but thanks!! +5%!

Offline testz

I will try and make this happen :)

Thanks in advance.  +5%  :)
Easy integration of BitShares ecosystem with C# applications can bring us additional value.

https://github.com/wildbunny/c-graphene-api

You're welcome :)

Thanks a lot!!!  +5% +5% +5%

Offline monsterer

I will try and make this happen :)

Thanks in advance.  +5%  :)
Easy integration of BitShares ecosystem with C# applications can bring us additional value.

https://github.com/wildbunny/c-graphene-api

You're welcome :)
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline testz

I will try and make this happen :)

Thanks in advance.  +5%  :)
Easy integration of BitShares ecosystem with C# applications can bring us additional value.

Offline monsterer

I will try and make this happen :)
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline testz

It did not happen to realize the decoding in C #.

It's a real PITA to get this working. Your solution is probably best - make a pull request and get it added as a real API call :)

As I know metaexchange also written in C# (https://github.com/wildbunny/metaexchange)
Can you share with community new BitShares 2.0 C# library which you made for metaexchange (https://github.com/wildbunny/metaexchange/tree/master/BitsharesRpc)?

Offline monsterer

It did not happen to realize the decoding in C #.

It's a real PITA to get this working. Your solution is probably best - make a pull request and get it added as a real API call :)
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
I'd recommend to put this into the code directly and do a pull request via github .. otherwise devs won't see your patch
use this repo

https://github.com/cryptonomex/graphene

Offline DarkDog

  • Newbie
  • *
  • Posts: 6
    • View Profile
It did not happen to realize the decoding in C #.

temp solution, add method to wallet_api

string wallet_api::get_memo(operation_history_id_type operation_id)const
{      
   auto obj = my->_remote_db->get_objects({ operation_id }).front();
   auto t = obj.template as<operation_history_object>();
   std::stringstream ss;
   auto memo = t.op.visit(detail::operation_printer(ss, *my, t.result));
   return memo;
}


Bitshares X account:  darkdog

Offline DarkDog

  • Newbie
  • *
  • Posts: 6
    • View Profile
well, it works.
There is only one problem, how to get the decrypted memo?
There is a python library for it:
https://github.com/xeroc/python-graphenelib/blob/master/scripts/monitor-deposits/monitor.py#L50-L56

There is also a Javascript library in bitshares-2-ui/dl somewhere that works like this
https://github.com/xeroc/node-graphene-monitor/blob/master/monitor.js#L70-L80

Thank you, I think there is a way easier.
I'll try to implement in C #.
Bitshares X account:  darkdog

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
well, it works.
There is only one problem, how to get the decrypted memo?
There is a python library for it:
https://github.com/xeroc/python-graphenelib/blob/master/scripts/monitor-deposits/monitor.py#L50-L56

There is also a Javascript library in bitshares-2-ui/dl somewhere that works like this
https://github.com/xeroc/node-graphene-monitor/blob/master/monitor.js#L70-L80

Offline DarkDog

  • Newbie
  • *
  • Posts: 6
    • View Profile
well, it works.
There is only one problem, how to get the decrypted memo?
Bitshares X account:  darkdog

Offline roadscape

I believe to get more than 100 records you need to follow a linked list..

Code: [Select]
get_account openledger
  "statistics": "2.6.96393",
  [...]

get_object 2.6.96393
[{
    "most_recent_op": "2.9.258652",
    [...]

get_object 2.9.258652
[{
    "id": "2.9.258652",
    "operation_id": "1.11.248779",  <-- here's the op record
    "next": "2.9.209383" <-- here's the next node to check
}]

get_object 2.9.209383
[etc]

Filtering needs to be done separately
http://cryptofresh.com  |  witness: roadscape

Offline DarkDog

  • Newbie
  • *
  • Posts: 6
    • View Profile
I have few questions about "get_account_history" - method

early "wallet_account_transaction_history"
wallet_account_transaction_history( const string& account_name,
                                                                                    const string& asset_symbol,
                                                                                    int32_t limit,
                                                                                    uint32_t start_block_num,
                                                                                    uint32_t end_block_num )const

now wallet_api::get_account_history(string name, int limit)const
max limit 100.

How can I get more records?
And use specific criteria to filter?


Bitshares X account:  darkdog