2023-03-11 16:57:08 +00:00
|
|
|
from pydantic import BaseModel, Extra
|
2023-03-10 00:23:05 +00:00
|
|
|
|
|
|
|
|
2023-03-11 16:57:08 +00:00
|
|
|
class MyModel(BaseModel):
|
|
|
|
class Config:
|
|
|
|
extra = Extra.forbid
|
|
|
|
|
|
|
|
|
|
|
|
class ContactDataBuyerSeller(MyModel):
|
2023-03-10 00:23:05 +00:00
|
|
|
username: str
|
|
|
|
name: str
|
|
|
|
feedback_score: int
|
|
|
|
trade_count: str
|
|
|
|
last_online: str
|
|
|
|
|
|
|
|
|
2023-03-11 16:57:08 +00:00
|
|
|
class ContactDataAd(MyModel):
|
2023-03-10 00:23:05 +00:00
|
|
|
payment_method: str
|
|
|
|
trade_type: str
|
|
|
|
advertiser: ContactDataBuyerSeller
|
|
|
|
asset: str
|
2023-03-10 15:27:30 +00:00
|
|
|
id: str | None
|
|
|
|
contact_id: str | None
|
2023-03-10 00:23:05 +00:00
|
|
|
|
|
|
|
|
2023-03-11 16:57:08 +00:00
|
|
|
class ContactData(MyModel):
|
2023-03-10 00:23:05 +00:00
|
|
|
buyer: ContactDataBuyerSeller
|
|
|
|
seller: ContactDataBuyerSeller
|
|
|
|
amount: str
|
2023-03-11 11:45:24 +00:00
|
|
|
amount_xmr: str | None
|
|
|
|
fee_xmr: str | None
|
|
|
|
amount_btc: str | None
|
|
|
|
fee_btc: str | None
|
2023-03-10 00:23:05 +00:00
|
|
|
advertisement: ContactDataAd
|
|
|
|
contact_id: str
|
|
|
|
currency: str
|
|
|
|
country: str
|
|
|
|
account_info: str
|
|
|
|
price_equation: str
|
|
|
|
is_buying: bool
|
|
|
|
is_selling: bool
|
|
|
|
created_at: str
|
|
|
|
escrowed_at: str
|
|
|
|
funded_at: str
|
|
|
|
canceled_at: str | None
|
|
|
|
closed_at: str | None
|
|
|
|
msg: str
|
|
|
|
released_at: str | None
|
|
|
|
payment_completed_at: str | None
|
|
|
|
disputed_at: str | None
|
|
|
|
arbitrated: bool
|
|
|
|
transfer_to_seller_non_custodial_wallet_transaction_confirmations: str | None
|
|
|
|
transfer_to_buyer_settlement_wallet_transaction_id: str | None
|
|
|
|
transfer_to_buyer_settlement_wallet_transaction_key: str | None
|
|
|
|
buyer_settlement_address: str | None
|
|
|
|
buyer_settlement_fee_level: str | None
|
|
|
|
seller_non_custodial_wallet_mnemonic: str | None
|
|
|
|
transfer_to_seller_non_custodial_wallet_transaction_id: str | None
|
|
|
|
|
|
|
|
|
2023-03-11 16:57:08 +00:00
|
|
|
class ContactActions(MyModel):
|
2023-03-10 15:27:30 +00:00
|
|
|
advertisement_public_view: str | None
|
|
|
|
advertisement_url: str | None
|
2023-03-10 00:23:05 +00:00
|
|
|
message_post_url: str
|
|
|
|
messages_url: str
|
|
|
|
release_url: str
|
2023-03-11 16:57:08 +00:00
|
|
|
cancel_url: str | None
|
2023-03-10 00:23:05 +00:00
|
|
|
|
|
|
|
|
2023-03-11 16:57:08 +00:00
|
|
|
class Contact(MyModel):
|
2023-03-10 00:23:05 +00:00
|
|
|
data: ContactData
|
|
|
|
actions: ContactActions
|
|
|
|
|
|
|
|
|
2023-03-11 16:57:08 +00:00
|
|
|
class DashboardResponseData(MyModel):
|
2023-03-10 00:23:05 +00:00
|
|
|
contact_count: int
|
|
|
|
contact_list: list[Contact]
|
|
|
|
|
|
|
|
|
2023-03-11 16:57:08 +00:00
|
|
|
class DashboardResponse(MyModel):
|
|
|
|
data: DashboardResponseData
|
2023-03-10 00:23:05 +00:00
|
|
|
|
|
|
|
|
2023-03-11 16:57:08 +00:00
|
|
|
class Dashboard(MyModel):
|
2023-03-10 00:23:05 +00:00
|
|
|
success: bool
|
2023-03-11 16:57:08 +00:00
|
|
|
status: int | None
|
2023-03-10 00:23:05 +00:00
|
|
|
message: str
|
2023-03-11 16:57:08 +00:00
|
|
|
response: DashboardResponse
|
2023-03-10 00:23:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
DashboardSchema = {
|
|
|
|
"success": "success",
|
|
|
|
"message": "message",
|
|
|
|
"contact_count": "response.data.contact_count",
|
|
|
|
"contact_list": "response.data.contact_list",
|
|
|
|
}
|
2023-03-11 16:57:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Pagination(MyModel):
|
|
|
|
prev: str | None
|
|
|
|
next: str | None
|
|
|
|
total_elements: int
|
|
|
|
total_pages: int
|
|
|
|
current_page: int
|
|
|
|
|
|
|
|
|
|
|
|
class Profile(MyModel):
|
|
|
|
username: str
|
|
|
|
name: str
|
|
|
|
feedback_score: int
|
|
|
|
trade_count: str
|
|
|
|
last_online: str
|
|
|
|
localbitcoins_trade_count: int | None
|
|
|
|
paxful_trade_count: int | None
|
|
|
|
|
|
|
|
|
|
|
|
class BuyBitcoinsOnlineAd(MyModel):
|
|
|
|
ad_id: str
|
|
|
|
countrycode: str
|
|
|
|
created_at: str
|
|
|
|
currency: str
|
|
|
|
max_amount: float | None
|
|
|
|
max_amount_available: float
|
|
|
|
min_amount: float | None
|
|
|
|
msg: str
|
|
|
|
online_provider: str
|
|
|
|
require_trusted_by_advertiser: bool
|
|
|
|
verified_email_required: bool
|
|
|
|
temp_price: float
|
|
|
|
track_max_amount: bool
|
|
|
|
trade_type: str
|
|
|
|
trusted_required: bool
|
|
|
|
visible: bool
|
|
|
|
asset: str
|
|
|
|
payment_method_detail: str | None
|
|
|
|
profile: Profile
|
|
|
|
require_feedback_score: int | None
|
|
|
|
first_time_limit_btc: float | None
|
|
|
|
limit_to_fiat_amounts: str | None
|
|
|
|
|
|
|
|
|
|
|
|
class Actions(MyModel):
|
|
|
|
public_view: str
|
|
|
|
|
|
|
|
|
|
|
|
class BuyBitcoinsOnlineResponseDataAdList(MyModel):
|
|
|
|
data: BuyBitcoinsOnlineAd
|
|
|
|
actions: Actions
|
|
|
|
|
|
|
|
|
|
|
|
class BuyBitcoinsOnlineResponseData(MyModel):
|
|
|
|
ad_count: int
|
|
|
|
ad_list: list[BuyBitcoinsOnlineResponseDataAdList]
|
|
|
|
|
|
|
|
|
|
|
|
class BuyBitcoinsOnlineResponse(MyModel):
|
|
|
|
data: BuyBitcoinsOnlineResponseData
|
|
|
|
pagination: Pagination | None
|
|
|
|
|
|
|
|
|
|
|
|
class BuyBitcoinsOnline(MyModel):
|
|
|
|
success: bool
|
|
|
|
message: str
|
|
|
|
response: BuyBitcoinsOnlineResponse
|
|
|
|
status: int | None
|
|
|
|
|
|
|
|
|
|
|
|
class BuyMoneroOnlineAd(MyModel):
|
|
|
|
ad_id: str
|
|
|
|
countrycode: str
|
|
|
|
created_at: str
|
|
|
|
currency: str
|
|
|
|
max_amount: float | None
|
|
|
|
max_amount_available: float
|
|
|
|
min_amount: float | None
|
|
|
|
msg: str
|
|
|
|
online_provider: str
|
|
|
|
require_trusted_by_advertiser: bool
|
|
|
|
verified_email_required: bool
|
|
|
|
temp_price: float
|
|
|
|
track_max_amount: bool
|
|
|
|
trade_type: str
|
|
|
|
trusted_required: bool
|
|
|
|
visible: bool
|
|
|
|
asset: str
|
|
|
|
payment_method_detail: str | None
|
|
|
|
profile: Profile
|
|
|
|
require_feedback_score: int | None
|
|
|
|
first_time_limit_xmr: float | None
|
|
|
|
limit_to_fiat_amounts: str | None
|
|
|
|
|
|
|
|
|
|
|
|
class BuyMoneroOnlineAdList(MyModel):
|
|
|
|
data: BuyMoneroOnlineAd
|
|
|
|
actions: Actions
|
|
|
|
|
|
|
|
|
|
|
|
class BuyMoneroOnlineResponseData(MyModel):
|
|
|
|
ad_count: int
|
|
|
|
ad_list: list[BuyMoneroOnlineAdList]
|
|
|
|
|
|
|
|
|
|
|
|
class BuyMoneroOnlineResponse(MyModel):
|
|
|
|
data: BuyMoneroOnlineResponseData
|
|
|
|
pagination: Pagination | None
|
|
|
|
|
|
|
|
|
|
|
|
class BuyMoneroOnline(MyModel):
|
|
|
|
success: bool
|
|
|
|
message: str
|
|
|
|
response: BuyMoneroOnlineResponse
|
|
|
|
status: int | None
|
|
|
|
|
|
|
|
|
|
|
|
BuyBitcoinsOnlineSchema = {
|
|
|
|
"success": "success",
|
|
|
|
"message": "message",
|
|
|
|
"ad_count": "response.data.ad_count",
|
|
|
|
"ad_list": "response.data.ad_list",
|
|
|
|
"pagination": "response.pagination",
|
|
|
|
}
|
|
|
|
|
|
|
|
BuyMoneroOnlineSchema = {
|
|
|
|
"success": "success",
|
|
|
|
"message": "message",
|
|
|
|
"ad_count": "response.data.ad_count",
|
|
|
|
"ad_list": "response.data.ad_list",
|
|
|
|
"pagination": "response.pagination",
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class AccountInfo(MyModel):
|
|
|
|
...
|
|
|
|
|
|
|
|
|
|
|
|
class AdsResponseDataAd(MyModel):
|
|
|
|
ad_id: str
|
|
|
|
countrycode: str
|
|
|
|
created_at: str
|
|
|
|
currency: str
|
|
|
|
max_amount: float | None
|
|
|
|
max_amount_available: float
|
|
|
|
min_amount: float | None
|
|
|
|
msg: str
|
|
|
|
online_provider: str
|
|
|
|
require_trusted_by_advertiser: bool
|
|
|
|
verified_email_required: bool
|
|
|
|
temp_price: float
|
|
|
|
track_max_amount: bool
|
|
|
|
trade_type: str
|
|
|
|
trusted_required: bool
|
|
|
|
visible: bool
|
|
|
|
asset: str
|
|
|
|
payment_method_detail: str | None
|
|
|
|
require_feedback_score: int | None
|
|
|
|
first_time_limit_xmr: float | None
|
|
|
|
first_time_limit_btc: float | None
|
|
|
|
limit_to_fiat_amounts: str | None
|
|
|
|
account_info: str
|
|
|
|
price_equation: str
|
|
|
|
|
|
|
|
|
|
|
|
class AdsActions(MyModel):
|
|
|
|
change_form: str | None
|
|
|
|
html_form: str | None
|
|
|
|
public_view: str | None
|
|
|
|
|
|
|
|
|
|
|
|
class AdsResponseDataAdList(MyModel):
|
|
|
|
data: AdsResponseDataAd
|
|
|
|
actions: AdsActions
|
|
|
|
|
|
|
|
|
|
|
|
class AdsResponseData(MyModel):
|
|
|
|
ad_count: int
|
|
|
|
ad_list: list[AdsResponseDataAdList]
|
|
|
|
|
|
|
|
|
|
|
|
class AdsResponse(MyModel):
|
|
|
|
data: AdsResponseData
|
|
|
|
|
|
|
|
|
|
|
|
class Ads(MyModel):
|
|
|
|
success: bool
|
|
|
|
message: str
|
|
|
|
response: AdsResponse
|
|
|
|
status: int | None
|
|
|
|
|
|
|
|
|
|
|
|
AdsSchema = {
|
|
|
|
"success": "success",
|
|
|
|
"message": "message",
|
|
|
|
"ad_count": "response.data.ad_count",
|
|
|
|
"ad_list": "response.data.ad_list",
|
|
|
|
}
|