Skip to content
This repository was archived by the owner on May 25, 2026. It is now read-only.
This repository was archived by the owner on May 25, 2026. It is now read-only.

Allowance - how to set that for a Polymarket Wallet? #93

Description

@cmp-nct

For someone not deeply familiar with these crypto networks this is a hurdle that's really complicated.

Would anyone have an example how a polymarket wallet (not an external one, created by signing up with an email) can be used to place an order ?
I've searched all I could find, it appears no one ever published any code for this project that actually sets an allowance.

I'm authenticated and set "funder", but here on I am stuck
client = ClobClient(host, key=PK, chain_id=chain_id, creds=credentials, signature_type=1, funder=funder)

I just want to set a LIMIT order for a token_id

  1. I've adapted the outdated set_allowances.py and tried to run it, I received an error about insuficient funds.
    That one: https://gist.github.com/poly-rodr/44313920481de58d5a3f6d1f8226bd5e

  2. When using signature_type = 1, I get the correct balance, but I also get "invalid signature" when testing the order.
    When using type 2 or -1 then I get a balance of 0.00 but instead of a signature error I get the insufficient balance at the end of the order post.

This shows correct balance but then resp = client.post_order(signed_order, OrderType.GTD) will bug out with "invalid signature"

client = ClobClient(host, key=PK, chain_id=chain_id, signature_type=1)
client.set_api_creds(client.create_or_derive_api_creds())
b = client.get_balance_allowance(params=BalanceAllowanceParams(asset_type=AssetType.COLLATERAL))

This shows no balance, but the post_order() will not complain about the PK/signature, in this case it says "no allowance"
client = ClobClient(host, key=PK, chain_id=chain_id, signature_type=2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions