Please tell me how to fill in the command by electrum-console
Mine works well on a just created testnet wallet.
payto('tb1qwhj8k62gppsvluxuxkk422vxwkztzeawerxe8q', 0.005, 0.0001, from_addr='tb1qyw252j0u6prxnyh4s6g3fah4e95a6jvn0z3z4l', unsigned=True)
Returns:
cHNidP8BAHECAAAAAZYvmtOLqeK4mbQ9hw62GX2zTAWCpMHAeQMmnPtbvjipAAAAAAD9////AjhSBwAAAAAAFgAUfaShSC/3lj1xGnS2UPKDMm/0QLIgoQcAAAAAABYAFHXke2lICGDP8Nw1rVUphnWEsWeuOZwdAAABAP1TAQIAAAAAAQJ5A+3PThU69FarfP6SgWNUSVObvNG0iJI2e0pCwuDeDAAAAAAA/f///3kD7c9OFTr0Vqt8/pKBY1RJU5u80bSIkjZ7SkLC4N4MAQAAAAD9////AX4aDwAAAAAAFgAUI5VFSfzQRmmS9YaRFPb1yWndSZMCRzBEAiBFQjWFowbj5KnwtzwJuwjjwVsQ0LmsOk5AkKA+Ta5wJwIgNy6OWIIWDbAMkluLqlDveYghvepSSsTnRMErY9b/O5EBIQMCQp1SMoA3ni/qiiE6+OExs8Q22O1MT2yK/XaD01VBDgJHMEQCIHoToNE4tUGwIrJ0rNeMthylip9PPYHLU3alw7rPrl99AiBdJgX4aIIsHbx8XjORiqQHrV/pEJMVmHR6fW0SNNNh3gEhA8bzEwOzKQ53NjZwpSUhBKQqOfgY2HytCAvxrZJPUXwrOZwdACIGAlqHYf9Qgi+wwHkOzfhdAfZy8kIasBAg2Il1ak3flEIyEM2+X5MAAACAAAAAAAAAAAAAIgICE9CKGMEaJOMEmsilFGhuKTtinRRHYH/lfrSKXbdw3kwQzb5fkwAAAIABAAAAAQAAAAAiAgPG8xMDsykOdzY2cKUlIQSkKjn4GNh8rQgL8a2ST1F8KxDNvl+TAAAAgAAAAAABAAAAAA==
Then:
signtransaction('cHNidP8BAHECAAAAAZYvmtOLqeK4mbQ9hw62GX2zTAWCpMHAeQMmnPtbvjipAAAAAAD9////AjhSBwAAAAAAFgAUfaShSC/3lj1xGnS2UPKDMm/0QLIgoQcAAAAAABYAFHXke2lICGDP8Nw1rVUphnWEsWeuOZwdAAABAP1TAQIAAAAAAQJ5A+3PThU69FarfP6SgWNUSVObvNG0iJI2e0pCwuDeDAAAAAAA/f///3kD7c9OFTr0Vqt8/pKBY1RJU5u80bSIkjZ7SkLC4N4MAQAAAAD9////AX4aDwAAAAAAFgAUI5VFSfzQRmmS9YaRFPb1yWndSZMCRzBEAiBFQjWFowbj5KnwtzwJuwjjwVsQ0LmsOk5AkKA+Ta5wJwIgNy6OWIIWDbAMkluLqlDveYghvepSSsTnRMErY9b/O5EBIQMCQp1SMoA3ni/qiiE6+OExs8Q22O1MT2yK/XaD01VBDgJHMEQCIHoToNE4tUGwIrJ0rNeMthylip9PPYHLU3alw7rPrl99AiBdJgX4aIIsHbx8XjORiqQHrV/pEJMVmHR6fW0SNNNh3gEhA8bzEwOzKQ53NjZwpSUhBKQqOfgY2HytCAvxrZJPUXwrOZwdACIGAlqHYf9Qgi+wwHkOzfhdAfZy8kIasBAg2Il1ak3flEIyEM2+X5MAAACAAAAAAAAAAAAAIgICE9CKGMEaJOMEmsilFGhuKTtinRRHYH/lfrSKXbdw3kwQzb5fkwAAAIABAAAAAQAAAAAiAgPG8xMDsykOdzY2cKUlIQSkKjn4GNh8rQgL8a2ST1F8KxDNvl+TAAAAgAAAAAABAAAAAA==')
Result:
02000000000101962f9ad38ba9e2b899b43d870eb6197db34c0582a4c1c07903269cfb5bbe38a90000000000fdffffff0238520700000000001600147da4a1482ff7963d711a74b650f283326ff440b220a107000000000016001475e47b69480860cff0dc35ad5529867584b167ae02473044022073a33bd4b4305c72619fdd97ca1c34ea63b07cddf037446186dd6f72186241820220095d8aad8070738fce70935fce8db3c9fd2578b13b2f5ea13ed3a6ccf373a2b90121025a8761ff50822fb0c0790ecdf85d01f672f2421ab01020d889756a4ddf944232399c1d00
You can also just skip the "unsigned=True" if it's not a watch-only address and the private-key can be found on the client you're generating the tx on the first place.