Create a new listing for a provided assetId, or new listings for provided assetIds or collectionId. Price and (currency or currencyId) are required.
export type ListingNewProps = {
price: number;
assetId?: string;
assetIds?: string[];
collectionId?: string;
liveTime?: number;
status?: ListingUpdateStatus;
walletUserId?: string;
currencyId?: string;
currency?: string;
}
const createListingResponse = await assetlayer.listings.new({
assetId: 'assetId',
currency: 'USD',
price: 1
});
const createListingsResponse = await assetlayer.listings.new({
assetIds: ['assetId_1', 'assetId_2'],
currencyId: 'currencyId',
price: 100
});
type ReturnType = CreateListingResponse | CreateListingsResponse;