from binance.client import Client
from binance.enums import *
api_key = 'x'
api_secret = 'x'
client = Client(api_key, api_secret)
# Request user information
asset = input("Enter the currency you want to exchange: ")
trade_type = input("Enter the trade type (BUY/SELL): ")
price = float(input("Enter the price per unit of the VES coin: "))
min_trade = float(input("Enter the minimum amount you are willing to trade: "))
max_trade = float(input("Enter the maximum amount you are willing to trade: "))
payment_methods = input("Enter the payment methods you accept separated by commas: ")
# Create the ad
ad = {
"asset": asset,
"tradeType": trade_type,
"price": price,
"minTrade": min_trade,
"maxTrade": max_trade,
"paymentMethods": payment_methods,
"advDetail": "Ad created automatically with Python"
}
# Post the ad
result = client.c2c_post_ad(ad)
print(result)
I have tried to run this bot to create p2p ads but it always gives me this error
AttributeError: Object ‘Customer’ has no attribute ‘p2p_post_ad’ and AttributeError: Object ‘Customer’ has no attribute ‘c2c_post_ad’