Fix bug in submit_invoice method (bfxapi.rest.endpoints.rest_authenticated_endpoints).

This commit is contained in:
Davide Casale
2023-02-12 21:24:42 +01:00
parent 7e421d3803
commit 9ada3b05a2
9 changed files with 95 additions and 44 deletions

View File

@@ -3,7 +3,6 @@
import os
from bfxapi.client import Client, Constants
from bfxapi.rest.types import CustomerInfo
bfx = Client(
REST_HOST=Constants.REST_HOST,
@@ -11,15 +10,15 @@ bfx = Client(
API_SECRET=os.getenv("BFX_API_SECRET")
)
customer_info: CustomerInfo = CustomerInfo(
nationality="GB",
resid_country="DE",
resid_city="Berlin",
resid_zip_code=1,
resid_street="Timechain",
full_name="Satoshi",
email="satoshi3@bitfinex.com",
)
customer_info = {
"nationality": "GB",
"resid_country": "DE",
"resid_city": "Berlin",
"resid_zip_code": 1,
"resid_street": "Timechain",
"full_name": "Satoshi",
"email": "satoshi3@bitfinex.com"
}
print(bfx.rest.auth.submit_invoice(
amount=1,
@@ -27,5 +26,5 @@ print(bfx.rest.auth.submit_invoice(
duration=864000,
order_id="order123",
customer_info=customer_info,
pay_currencies=["ETH"],
pay_currencies=["ETH"]
))