Thanks, I got it working now. One more question.
When running this:
from bitshares.account import Account
account = Account("xeroc")
history = account.history(exclude_ops=[6])
data = [trans for trans in history]
return data
The following is returned:
[
    {
        "id": "1.11.158994520",
        "op": [
            6,
            {
                "fee": {
                    "amount": 1666,
                    "asset_id": "1.3.0"
                },
                "account": "1.2.282",
                "new_options": {
                    "memo_key": "BTS5TPTziKkLexhVKsQKtSpo4bAv5RnB8oXcG4sMHEwCcTf3r7dqE",
                    "voting_account": "1.2.5",
                    "num_witness": 21,
...SNIPPET...
It seems like the exclude_ops dosen't work. The same thing applies to only_ops, or what am I doing wrong?