Skip to content

TypeError: RelayClient.__init__() got an unexpected keyword argument 'host' #25

Description

@cheukhin1024

Background

I am trying to use py_builder_relayer_client 0.0.2 version to have gasless order placement.
However, after I enter my PK, Relayer Key and Relayer address correctly and run the following code , it returns me an error: TypeError: RelayClient.__init__() got an unexpected keyword argument 'host'

Here is the code:

from py_builder_relayer_client.client import RelayClient

client = RelayClient(
    host="https://relayer-v2.polymarket.com/",
    chain=137,
    signer=os.getenv("PRIVATE_KEY"),
    relayer_api_key=os.environ["RELAYER_API_KEY"],
    relayer_api_key_address=os.environ["RELAYER_API_KEY_ADDRESS"],
) 

Expectation

According to documentation ( https://docs.polymarket.com/trading/gasless#client-setup ), after running the above code, there should be auto-deploys on first transaction. Then, I can place orders with py-clob-client-v2 with no gas fee.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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